Beispiel #1
0
        private void Setup(QTEType _qteType, string _inputName, float _duration, Animator _animator, bool _wrongKeyFails, float _axisThreshold)
        {
            qteType  = _qteType;
            qteState = QTEState.None;

            progress      = 0f;
            inputName     = _inputName;
            animator      = _animator;
            wrongKeyFails = _wrongKeyFails;
            numPresses    = 0;
            startTime     = Time.time;
            lastPressTime = 0f;
            endTime       = Time.time + _duration;
            axisThreshold = _axisThreshold;
        }
Beispiel #2
0
        protected void Setup(QTEType _qteType, string _inputName, float _duration, Animator _animator, bool _wrongKeyFails, float _axisThreshold)
        {
            qteType  = _qteType;
            qteState = QTEState.None;

            progress      = 0f;
            inputName     = _inputName;
            animator      = _animator;
            wrongKeyFails = _wrongKeyFails;
            numPresses    = 0;
            startTime     = Time.time;
            lastPressTime = 0f;
            endTime       = Time.time + _duration;
            axisThreshold = _axisThreshold;

            KickStarter.eventManager.Call_OnQTEBegin(qteType, inputName, _duration);
        }
Beispiel #3
0
 public void updateEvent(float delta)
 {
     if (state == QTEState.RUN)
     {
         timer += delta;
         if (timer >= interval)
         {
             timer = timer - interval;
             counter++;
             listener?.Invoke();
             listenerObj?.Invoke(obj);
             if (counter >= repeatCount)
             {
                 state = QTEState.END;
             }
         }
     }
 }
Beispiel #4
0
 /**
  * Automatically wins the current QTE.
  */
 public void SkipQTE()
 {
     endTime  = 0f;
     qteState = QTEState.Win;
 }
Beispiel #5
0
 public void SkipQTE()
 {
     endTime = 0f;
     qteState = QTEState.Win;
 }
Beispiel #6
0
 private void Win()
 {
     if (animator)
     {
         animator.Play ("Win");
     }
     qteState = QTEState.Win;
     endTime = 0f;
 }
Beispiel #7
0
        private void Setup(QTEType _qteType, string _inputName, float _duration, Animator _animator, bool _wrongKeyFails)
        {
            qteType = _qteType;
            qteState = QTEState.None;

            progress = 0f;
            inputName = _inputName;
            animator = _animator;
            wrongKeyFails = _wrongKeyFails;
            numPresses = 0;
            startTime = Time.time;
            lastPressTime = 0f;
            endTime = Time.time + _duration;
        }
Beispiel #8
0
 private void Lose()
 {
     qteState = QTEState.Lose;
     endTime = 0f;
     if (animator)
     {
         animator.Play ("Lose");
     }
 }
Beispiel #9
0
 public void start()
 {
     timer   = 0;
     counter = 0;
     state   = QTEState.RUN;
 }