mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-04-22 20:19:34 +08:00

* 添加CharacterMode,SkillMode,ItemMode * 添加默认地图属性 * 添加CharacterMode, SkillMode, ItemMode的Loader方法,优化构造函数 * 添加和优化Equals方法 * 删除Symbol
37 lines
782 B
C#
37 lines
782 B
C#
using Milimoe.FunGame.Core.Interface.Entity;
|
|
|
|
namespace Milimoe.FunGame.Core.Entity
|
|
{
|
|
public class PassiveItem : Item
|
|
{
|
|
public PassiveSkill? Skill { get; set; } = null;
|
|
|
|
protected PassiveItem()
|
|
{
|
|
Active = false;
|
|
}
|
|
|
|
protected PassiveItem(int id, string name)
|
|
{
|
|
Active = false;
|
|
Id = id;
|
|
Name = name;
|
|
}
|
|
|
|
internal static PassiveItem GetInstance()
|
|
{
|
|
return new();
|
|
}
|
|
|
|
internal static PassiveItem GetInstance(int id, string name)
|
|
{
|
|
return new(id, name);
|
|
}
|
|
|
|
public override bool Equals(IBaseEntity? other)
|
|
{
|
|
return other is PassiveItem i && i.Name == Name;
|
|
}
|
|
}
|
|
}
|