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; }
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); }
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; } } } }
/** * Automatically wins the current QTE. */ public void SkipQTE() { endTime = 0f; qteState = QTEState.Win; }
public void SkipQTE() { endTime = 0f; qteState = QTEState.Win; }
private void Win() { if (animator) { animator.Play ("Win"); } qteState = QTEState.Win; endTime = 0f; }
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; }
private void Lose() { qteState = QTEState.Lose; endTime = 0f; if (animator) { animator.Play ("Lose"); } }
public void start() { timer = 0; counter = 0; state = QTEState.RUN; }