//buff加载(无关buff实现的基本信息的加载) public BuffBase(BuffName name, Unit target, Unit caster) { data = Gamef.LoadBuffData(name); this.target = target; this.caster = caster; Start(); }
public virtual void Reset(params object[] Params) { BuffName name; Unit target; Unit caster; if (Params.Length == 4) { BuffData data; if (Params[0] is BuffName && Params[1] is Unit && Params[2] is Unit && Params[3] is BuffData) { name = (BuffName)Params[0]; target = Params[1] as Unit; caster = Params[2] as Unit; data = Params[3] as BuffData; // this.data = data; this.target = target; this.caster = caster; Start(); } } else if (Params.Length == 3) { if (Params[0] is BuffName && Params[1] is Unit && Params[2] is Unit) { name = (BuffName)Params[0]; target = Params[1] as Unit; caster = Params[2] as Unit; // data = Gamef.LoadBuffData(name); this.target = target; this.caster = caster; Start(); } } }