Antura  1.1.0
Antura.UI.MinigamesUITimer Class Reference

Shows a timer during a minigame. More...

Inheritance diagram for Antura.UI.MinigamesUITimer:
Antura.UI.ABSMinigamesUIComponent

Public Member Functions

void Setup (float _timerDuration, bool _playImmediately=false)
 Sets the duration of the timer. Call this before calling any other method. More...
 
void Play ()
 Plays the timer More...
 
void Pause ()
 Pauses the timer More...
 
void Restart ()
 Rewinds then restarts the timer More...
 
void Rewind ()
 Rewinds the timer and pauses it More...
 
void Complete ()
 Completes the timer More...
 
void Goto (float _time, bool _andPlay=false)
 Sends the timer to the given time (in seconds) More...
 
void GotoPercentage (float _percentage, bool _andPlay=false)
 Sends the timer to the given time percentage ( More...
 

Public Attributes

Image Radial
 
TextMeshProUGUI TfTimer
 
Color EndColor = Color.red
 

Properties

float Duration [get]
 
float Elapsed [get]
 
- Properties inherited from Antura.UI.ABSMinigamesUIComponent
bool IsSetup [get, protected set]
 
RectTransform RectTransform [get]
 

Additional Inherited Members

- Protected Member Functions inherited from Antura.UI.ABSMinigamesUIComponent
bool Validate (string _caller)
 

Detailed Description

Shows a timer during a minigame.

Member Function Documentation

◆ Complete()

void Antura.UI.MinigamesUITimer.Complete ( )

Completes the timer

◆ Goto()

void Antura.UI.MinigamesUITimer.Goto ( float  _time,
bool  _andPlay = false 
)

Sends the timer to the given time (in seconds)

Parameters
_timeTime (in seconds) to go to
_andPlayIf TRUE also plays the timer after going to the given position, otherwise pauses it

◆ GotoPercentage()

void Antura.UI.MinigamesUITimer.GotoPercentage ( float  _percentage,
bool  _andPlay = false 
)

Sends the timer to the given time percentage (

0 to 1)

Parameters
_percentageTime percentage (
0 to 1
) to go to
_andPlayIf TRUE also plays the timer after going to the given position, otherwise pauses it

◆ Pause()

void Antura.UI.MinigamesUITimer.Pause ( )

Pauses the timer

◆ Play()

void Antura.UI.MinigamesUITimer.Play ( )

Plays the timer

◆ Restart()

void Antura.UI.MinigamesUITimer.Restart ( )

Rewinds then restarts the timer

◆ Rewind()

void Antura.UI.MinigamesUITimer.Rewind ( )

Rewinds the timer and pauses it

◆ Setup()

void Antura.UI.MinigamesUITimer.Setup ( float  _timerDuration,
bool  _playImmediately = false 
)

Sets the duration of the timer. Call this before calling any other method.

Parameters
_timerDurationTimer duration in seconds
_playImmediatelyIf TRUE the timer starts immediately, otherwise waits for a Play call

Member Data Documentation

◆ EndColor

Color Antura.UI.MinigamesUITimer.EndColor = Color.red

◆ Radial

Image Antura.UI.MinigamesUITimer.Radial

◆ TfTimer

TextMeshProUGUI Antura.UI.MinigamesUITimer.TfTimer

Property Documentation

◆ Duration

float Antura.UI.MinigamesUITimer.Duration
get

◆ Elapsed

float Antura.UI.MinigamesUITimer.Elapsed
get

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