mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-04-22 03:59:35 +08:00

* 添加CharacterMode,SkillMode,ItemMode * 添加默认地图属性 * 添加CharacterMode, SkillMode, ItemMode的Loader方法,优化构造函数 * 添加和优化Equals方法 * 删除Symbol
33 lines
896 B
C#
33 lines
896 B
C#
using Milimoe.FunGame.Core.Entity;
|
|
using Milimoe.FunGame.Core.Interface.Base;
|
|
using Milimoe.FunGame.Core.Library.Constant;
|
|
|
|
namespace Milimoe.FunGame.Core.Api.Factory
|
|
{
|
|
internal class SkillFactory : IFactory<Skill>
|
|
{
|
|
public Type EntityType => _EntityType;
|
|
|
|
private Type _EntityType = typeof(Skill);
|
|
|
|
internal Skill Create(SkillType type = SkillType.Passive)
|
|
{
|
|
switch (type)
|
|
{
|
|
case SkillType.Passive:
|
|
_EntityType = typeof(PassiveSkill);
|
|
return PassiveSkill.GetInstance();
|
|
case SkillType.Active:
|
|
default:
|
|
_EntityType = typeof(ActiveSkill);
|
|
return ActiveSkill.GetInstance();
|
|
}
|
|
}
|
|
|
|
public Skill Create()
|
|
{
|
|
return Create(SkillType.Passive);
|
|
}
|
|
}
|
|
}
|