Example #1
0
    public void addTimeAction(float time, EventHandlerParameter callBack)
    {
//		Debug.Log("addTimeAction   time == " + time);
        TimeAction action = new TimeAction();

        action.delay     = time;
        action.startTime = Time.time;
        action.callBack  = callBack;
        _timeActions.Add(action);
    }
Example #2
0
    public void Invoke(EventHandlerParameter callBack, float delay, int times = 0, object data = null)
    {
        TimeAction action = new TimeAction();

        action.delay     = delay;
        action.times     = times;
        action.startTime = Time.time;
        action.callBack  = callBack;
        action.data      = data;
        _timeActions.Add(action);
    }
Example #3
0
 public void CancelInvoke(EventHandlerParameter callBack)
 {
     _actionCount = _timeActions.Count;
     for (int i = 0; i < _actionCount; i++)
     {
         TimeAction action = _timeActions [i];
         if (action.callBack == callBack)
         {
             _timeActions.RemoveAt(i);
             return;
         }
     }
 }
Example #4
0
 public bool IsInvoking(EventHandlerParameter callBack)
 {
     _actionCount = _timeActions.Count;
     for (int i = 0; i < _actionCount; i++)
     {
         TimeAction action = _timeActions [i];
         if (action.callBack == callBack)
         {
             return(true);
         }
     }
     return(false);
 }