public override void OnBeRemoved() { base.OnBeRemoved(); AttrMgr.Remove(R_Attr); AttrMgr.Remove(R_Convert); if (PerformMgr != null) { foreach (var item in R_Performs) { PerformMgr.Despawn(item); } } }
// obj1:来源对象 // obj2:来源技能 public override void OnBeAdded(BaseCoreMono mono, params object[] obj) { base.OnBeAdded(mono, obj); R_Caster = GetAddedObjData <BaseUnit>(0); R_Skill = GetAddedObjData <TDBaseSkillData>(1); R_Attr = AttrMgr.Add(Attr); R_Convert = AttrMgr.Add(Convert); R_Performs = new List <BasePerform>(); CurTime = 0; RTMaxTime = MaxTime; Valid = true; if (PerformMgr != null) { foreach (var item in Performs) { R_Performs.Add(PerformMgr.Spawn(item)); } } }
public void DoDestroy() { Callback_OnDoDestroy?.Invoke(this); IsLifeOver = true; PerformMgr.Despawn(this); }