Basic slider-based timer for response menus.
More...
Basic slider-based timer for response menus.
◆ Awake()
virtual void PixelCrushers.DialogueSystem.UnityUITimer.Awake |
( |
| ) |
|
|
virtual |
◆ OnDisable()
virtual void PixelCrushers.DialogueSystem.UnityUITimer.OnDisable |
( |
| ) |
|
|
virtual |
◆ SkipTime()
void PixelCrushers.DialogueSystem.UnityUITimer.SkipTime |
( |
float |
amountToSkip | ) |
|
Adjusts the amount of time left.
- Parameters
-
amountToSkip | Seconds to fast-forward the timer (or rewind the timer if negative). |
◆ StartCountdown()
virtual void PixelCrushers.DialogueSystem.UnityUITimer.StartCountdown |
( |
float |
duration, |
|
|
System.Action |
timeoutHandler |
|
) |
| |
|
virtual |
Called by the response menu.
Starts the timer. Each tick, the UpdateTimeLeft method is called.
- Parameters
-
duration | Duration in seconds. |
timeoutHandler | Handler to invoke if the timer reaches zero. |
◆ UpdateTimeLeft()
virtual void PixelCrushers.DialogueSystem.UnityUITimer.UpdateTimeLeft |
( |
float |
normalizedTimeLeft | ) |
|
|
virtual |
Called each tick to update the timer display.
The default method updates a UI slider.
- Parameters
-
normalizedTimeLeft | 1 at the start, 0 when the timer times out. |
The documentation for this class was generated from the following file:
- D:/Documents/Unity Projects/Dialogue System/Dev/Release/Assets/Dialogue System/Scripts/Supplemental/UI/Dialogue UI/UnityUITimer.cs