public bool Touch(FxOne fxone) { fxone.mName = m_name; fxone.SetEndHandler(null); fxone.SetPlayOrStopHandler(null); if (!m_loading && m_asset == null) return false; ++m_usedCount; fxone.SetEndHandler(OnFxLifeEndHandler); fxone.SetPlayOrStopHandler(FxEventHandler); return true; }
void OnFxLifeEndHandler(FxOne fxone,bool isDestroy) { --m_usedCount; fxone.SetEndHandler(null); fxone.SetPlayOrStopHandler(null); lastReleaseTime = Time.time; m_deferGetFx.Remove(fxone); if (isDestroy == false) FxCacheMan.Instance.GiveBack(fxone); else FxCacheMan.Instance.RemoveFx(fxone); }