(client) feat:添加基地界面到游玩界面的过程,添加存档管理,技能树变得可用 (#58)

Co-authored-by: m0_75251201 <m0_75251201@noreply.gitcode.com>
Reviewed-on: http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite/pulls/58
This commit is contained in:
2025-10-03 00:31:34 +08:00
parent aff747be17
commit dd9d90439d
134 changed files with 10322 additions and 4872 deletions

View File

@@ -1,16 +1,18 @@
using System;
using Data;
using Item;
using Managers;
using UnityEngine;
namespace Entity
{
public class Monster:LivingEntity
{
private WeaponResource weapon;
public override void Init(EntityDef entityDef)
public override void Init(EntityDef entityDefine)
{
base.Init(entityDef);
var monsterDef = entityDef as MonsterDef;
base.Init(entityDefine);
var monsterDef = entityDefine as MonsterDef;
if (monsterDef != null)
{
weapon = (WeaponResource)ItemResourceManager.Instance.GetItem(monsterDef.weapon.defName);
@@ -21,6 +23,13 @@ namespace Entity
{
return weapon;
}
private void OnCollisionStay2D(Collision2D other)
{
if (!other.gameObject.CompareTag("Player")) return;
var playerEntity = other.gameObject.GetComponent<Entity>();
playerEntity?.OnHit(this);
}
}
}