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);
                }
            }
        }
Esempio n. 2
0
 public WaitUtil.CountdownEvent WaitForSecond(WaitUtil.CountdownEvent pEvent)
 {
     mCountdownEventsManager.Register(pEvent);
     enabled = true;
     return(pEvent);
 }
Esempio n. 3
0
 public void RemoveTimeAction(WaitUtil.CountdownEvent pCounter)
 {
     mCountdownEventsManager.UnRegister(pCounter);
 }
 public void UnRegister(WaitUtil.CountdownEvent pEvent)
 {
     mCountdownEvents.Remove(pEvent);
 }