public void Register(WaitUtil.ConditionEvent pEvent)
        {
            if (pEvent.id == 0)
            {
                mConditionEvents.Add(pEvent);
            }
            else
            {
                bool exist = false;
                for (int i = 0; i < mConditionEvents.Count; i++)
                {
                    if (pEvent.id == mConditionEvents[i].id)
                    {
                        exist = true;
                        mConditionEvents[i] = pEvent;
                        break;
                    }
                }

                if (!exist)
                {
                    mConditionEvents.Add(pEvent);
                }
            }
        }
Esempio n. 2
0
 public WaitUtil.ConditionEvent WaitForCondition(WaitUtil.ConditionEvent pEvent)
 {
     mConditionEventsManager.Register(pEvent);
     enabled = true;
     return(pEvent);
 }
Esempio n. 3
0
 public void RemoveTriggerAction(WaitUtil.ConditionEvent pCounter)
 {
     mConditionEventsManager.UnRegister(pCounter);
 }
 public void UnRegister(WaitUtil.ConditionEvent pEvent)
 {
     mConditionEvents.Remove(pEvent);
 }