public void RemoveEffect(EffectObject effectObject) { if (mEffectList.Remove(effectObject)) { effectObject.Dispose(); } }
public EffectObject PlayEffect(string effectName, float duration, Transform parent, Vector3 pos, Quaternion rotate) { EffectObject tmpEffectObj = Game.PoolMgr.GetObjectPool <EffectObject>().Spawn(); tmpEffectObj.Init(effectName, duration, parent, pos, rotate); tmpEffectObj.Play(); mEffectList.Add(tmpEffectObj); return(tmpEffectObj); }