mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 02:47:12 +08:00
Co-authored-by: zzdxxz <2079238449@qq.com> Co-committed-by: zzdxxz <2079238449@qq.com>
26 lines
584 B
C#
26 lines
584 B
C#
using Data;
|
|
using Item;
|
|
using Managers;
|
|
|
|
namespace Entity
|
|
{
|
|
public class Monster:Entity
|
|
{
|
|
private WeaponResource weapon;
|
|
public override void Init(EntityDef entityDef)
|
|
{
|
|
base.Init(entityDef);
|
|
var monsterDef = entityDef as MonsterDef;
|
|
if (monsterDef != null)
|
|
{
|
|
weapon = (WeaponResource)ItemResourceManager.Instance.GetItem(monsterDef.weapon.defName);
|
|
}
|
|
}
|
|
|
|
public override WeaponResource GetCurrentWeapon()
|
|
{
|
|
return weapon;
|
|
}
|
|
}
|
|
|
|
} |