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

* 添加DataTable Converter * 修改DataSet Converter,支持多个Tables反序列化,此转换器也支持兼容DataTable * 修改构造方法、工厂方法,添加常用类自定义转换器
33 lines
880 B
C#
33 lines
880 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 new PassiveSkill();
|
|
case SkillType.Active:
|
|
default:
|
|
_EntityType = typeof(ActiveSkill);
|
|
return new ActiveSkill();
|
|
}
|
|
}
|
|
|
|
public Skill Create()
|
|
{
|
|
return Create(SkillType.Passive);
|
|
}
|
|
}
|
|
}
|