public virtual void OnDie() { if (unitTheme != null) { //GameObject.Destroy(unitTheme); ParticlePool.Instance.ReturnGameObject(unitTheme, ParticlePool.ResetParticle); unitTheme = null; } //本地Buff的Id都是0 if (attri.IsMine() && this.EffectId != 0) { //NetDateInterface.FastRemoveBuff((int)this.type, attri.gameObject); NetDateInterface.RemoveBuffId(this.EffectId, attri.gameObject); } }