void Update() { if (!BePlayering) return; bool allStopped = true; int num = PS.Length; for (int i = 0;i<num;i++) { if (!PS[i].isStopped) { //Debug.LogError (PS[i].gameObject.name+"----原因不能回池"); allStopped = false; } } if (allStopped) { BePlayering = false; //Debug.LogError ("特效name:"+transform.name+" 自销毁回池!"); GoPoolMgr.GetIns().Put (transform.name, transform); } }
public void Stop() { for (int i = 0; i < PS.Length; i++) { PS [i].Stop (); } BePlayering = false; RemoveEff (gameObject); //Debug.LogError ("特效name:"+transform.name+" Stop回池!"); GoPoolMgr.GetIns().Put (transform.name, transform); }