public void Register(WaitUtil.CountdownEvent pEvent) { if (pEvent.id == 0) { mCountdownEvents.Add(pEvent); } else { bool exist = false; for (int i = 0; i < mCountdownEvents.Count; i++) { if (pEvent.id == mCountdownEvents[i].id) { exist = true; mCountdownEvents[i] = pEvent; break; } } if (!exist) { mCountdownEvents.Add(pEvent); } } }
public WaitUtil.CountdownEvent WaitForSecond(WaitUtil.CountdownEvent pEvent) { mCountdownEventsManager.Register(pEvent); enabled = true; return(pEvent); }
public void RemoveTimeAction(WaitUtil.CountdownEvent pCounter) { mCountdownEventsManager.UnRegister(pCounter); }
public void UnRegister(WaitUtil.CountdownEvent pEvent) { mCountdownEvents.Remove(pEvent); }