Esempio n. 1
0
    public void StartTimedAction(StartMethodDelegate start, EndMethodDelegate end, CancelMethodDelegate cancel, float duration)
    {
        if (_isInAction)
        {
            //if there's another timed action going on, don't start a new one
            return;
        }

        _timedActionDuration = duration;
        _timedActionTimer    = 0;
        _lastAimedObject     = _playerControl.GetAimedObject();
        _cancelRequested     = false;
        EndMethod            = end;
        CancelMethod         = cancel;

        start();

        _isInAction = true;
    }
Esempio n. 2
0
 public MethodTrace(EndMethodDelegate endMethodDelegate)
 {
     this._endMethodDelegate = endMethodDelegate;
 }