PixelCrushers.DialogueSystem.UnityUITimer Class Reference

Basic slider-based timer for response menus. More...

Inheritance diagram for PixelCrushers.DialogueSystem.UnityUITimer:
Collaboration diagram for PixelCrushers.DialogueSystem.UnityUITimer:

Public Member Functions

virtual void Awake ()
 
virtual void StartCountdown (float duration, System.Action timeoutHandler)
 Called by the response menu. More...
 
void SkipTime (float amountToSkip)
 Adjusts the amount of time left. More...
 
virtual void UpdateTimeLeft (float normalizedTimeLeft)
 Called each tick to update the timer display. More...
 
virtual void OnDisable ()
 

Detailed Description

Basic slider-based timer for response menus.

Member Function Documentation

◆ 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
amountToSkipSeconds 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
durationDuration in seconds.
timeoutHandlerHandler 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
normalizedTimeLeft1 at the start, 0 when the timer times out.

The documentation for this class was generated from the following file: