Adventure Creator
1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
QTEState | GetState () |
Gets the current QTE state (None, Win, Lose, Running) More... | |
void | SkipQTE () |
void | KillQTE () |
void | StartSinglePressQTE (string _inputName, float _duration, Animator _animator=null, bool _wrongKeyFails=false) |
Begins a QTE that involves a single key being pressed to win. More... | |
void | StartSingleAxisQTE (string _inputName, float _duration, float _axisThreshold, Animator _animator=null, bool _wrongKeyFails=false) |
Begins a QTE that involves a single axis being pressed to win. More... | |
void | StartHoldKeyQTE (string _inputName, float _duration, float _holdDuration, QTEHoldReleaseBehaviour _qteHoldReleaseBehaviour=QTEHoldReleaseBehaviour.Reset, Animator _animator=null, bool _wrongKeyFails=false) |
Begins a QTE that involves a single key being held down to win. More... | |
void | StartButtonMashQTE (string _inputName, float _duration, int _targetPresses, bool _doCooldown, float _cooldownTime, Animator _animator=null, bool _wrongKeyFails=false) |
Begins a QTE that involves a single key being pressed repeatedly to win. More... | |
void | StartThumbstickRotationQTE (string _horizontalInputName, string _verticalInputName, float _duration, float _targetRotations, bool _rotationIsClockwise, Animator _animator=null, bool _wrongDirectionFails=false) |
Begins a QTE that involves rotating two input axes to win. More... | |
float | GetRemainingTimeFactor () |
Gets the time factor remaining in the current QTE, as a decimal. More... | |
float | GetProgress () |
Gets the progress made towards completing the current QTE, as a decimal. More... | |
bool | QTEIsActive () |
Checks if a QTE sequence is currently active. More... | |
void | UpdateQTE () |
Protected Member Functions | |
void | Setup (QTEType _qteType, string _inputName, float _duration, Animator _animator, bool _wrongKeyFails, float _axisThreshold) |
virtual void | Win () |
virtual void | Lose () |
Static Protected Attributes | |
const string | touchScreenTap = "TOUCHSCREENTAP" |
This script handles the state, input and progress of Quick Time Events (QTEs). It should be attached to the GameEngine prefab.
float AC.PlayerQTE.GetProgress | ( | ) |
Gets the progress made towards completing the current QTE, as a decimal.
float AC.PlayerQTE.GetRemainingTimeFactor | ( | ) |
Gets the time factor remaining in the current QTE, as a decimal.
QTEState AC.PlayerQTE.GetState | ( | ) |
Gets the current QTE state (None, Win, Lose, Running)
void AC.PlayerQTE.KillQTE | ( | ) |
Automatically end the current QTE.
bool AC.PlayerQTE.QTEIsActive | ( | ) |
Checks if a QTE sequence is currently active.
void AC.PlayerQTE.SkipQTE | ( | ) |
Automatically wins the current QTE.
void AC.PlayerQTE.StartButtonMashQTE | ( | string | _inputName, |
float | _duration, | ||
int | _targetPresses, | ||
bool | _doCooldown, | ||
float | _cooldownTime, | ||
Animator | _animator = null , |
||
bool | _wrongKeyFails = false |
||
) |
Begins a QTE that involves a single key being pressed repeatedly to win.
_inputName | The name of the input button that must be pressed repeatedly to win |
_duration | The duration, in seconds, that the QTE lasts |
_targetPresses | The number of times that the key must be pressed to win |
_doCooldown | If True, then the number of registered key-presses will decrease over time |
_cooldownTime | The cooldown time, if _doCooldown = True |
_animator | An Animator that will be manipulated if it has "Hit", "Win" and "Lose" states |
_wrongKeyFails | If True, then pressing any key other than _inputName will instantly fail the QTE |
void AC.PlayerQTE.StartHoldKeyQTE | ( | string | _inputName, |
float | _duration, | ||
float | _holdDuration, | ||
QTEHoldReleaseBehaviour | _qteHoldReleaseBehaviour = QTEHoldReleaseBehaviour.Reset , |
||
Animator | _animator = null , |
||
bool | _wrongKeyFails = false |
||
) |
Begins a QTE that involves a single key being held down to win.
_inputName | The name of the input button that must be held down to win |
_duration | The duration, in seconds, that the QTE lasts |
_holdDuration | The duration, in seconds, that the key must be held down for |
_qteHoldReleaseBehaviour | What happens if the key is released |
_animator | An Animator that will be manipulated if it has "Win" and "Lose" states, and a "Held" trigger |
_wrongKeyFails | If True, then pressing any key other than _inputName will instantly fail the QTE |
void AC.PlayerQTE.StartSingleAxisQTE | ( | string | _inputName, |
float | _duration, | ||
float | _axisThreshold, | ||
Animator | _animator = null , |
||
bool | _wrongKeyFails = false |
||
) |
Begins a QTE that involves a single axis being pressed to win.
_inputName | The name of the input axis that must be pressed to win |
_duration | The duration, in seconds, that the QTE lasts |
_axisThreshold | If positive, the value that the input must be greater than for it to register as succesful. If positive, the input must be lower that this value. |
_animator | An Animator that will be manipulated if it has "Win" and "Lose" states |
_wrongKeyFails | If True, then pressing any axis other than _inputName will instantly fail the QTE |
void AC.PlayerQTE.StartSinglePressQTE | ( | string | _inputName, |
float | _duration, | ||
Animator | _animator = null , |
||
bool | _wrongKeyFails = false |
||
) |
Begins a QTE that involves a single key being pressed to win.
_inputName | The name of the input button that must be pressed to win |
_duration | The duration, in seconds, that the QTE lasts |
_animator | An Animator that will be manipulated if it has "Win" and "Lose" states |
_wrongKeyFails | If True, then pressing any key other than _inputName will instantly fail the QTE |
void AC.PlayerQTE.StartThumbstickRotationQTE | ( | string | _horizontalInputName, |
string | _verticalInputName, | ||
float | _duration, | ||
float | _targetRotations, | ||
bool | _rotationIsClockwise, | ||
Animator | _animator = null , |
||
bool | _wrongDirectionFails = false |
||
) |
Begins a QTE that involves rotating two input axes to win.
_horizontalInputName | The name of the horizontal input axis |
_verticalInputName | The name of the vertical input axis |
_duration | The duration, in seconds, that the QTE lasts |
_targetRotations | How many revolutions the input must be rotated by |
_rotationIsClockwise | If true, input is required to be clockwise. Otherwise, it must be anti-clockwise |
_animator | An Animator that will be manipulated if it has "Win" and "Lose" states |
_wrongDirectionFails | If True, then rotating in the opposite direction will instantly fail the QTE |
void AC.PlayerQTE.UpdateQTE | ( | ) |
Updates the current QTE. This is called every frame by StateHandler.