PropertyInterface
Nectunia.Utility.CountDown Class Reference

Detailed Description

Count-down class.

Can only be used in a MonoBehaviour script because of the "Time.time" use.

Properties

bool IsUp [get]
 Return True if the duration of the count-down has elapsed or if the count-down has not started yet. Return False otherwise. More...
 
float Duration [get, set]
 The count-down duration. More...
 

Public Member Functions

 CountDown (float duration=0f)
 
void start ()
 Start the count-down. More...
 
float getRemainingSecond ()
 Return the remaining number of second of the count-down. More...
 
void reset ()
 Reset the count-down. More...
 

Property Documentation

◆ Duration

float Nectunia.Utility.CountDown.Duration
getset

The count-down duration.

◆ IsUp

bool Nectunia.Utility.CountDown.IsUp
get

Return True if the duration of the count-down has elapsed or if the count-down has not started yet. Return False otherwise.

Constructor & Destructor Documentation

◆ CountDown()

Nectunia.Utility.CountDown.CountDown ( float  duration = 0f)

Member Function Documentation

◆ getRemainingSecond()

float Nectunia.Utility.CountDown.getRemainingSecond ( )

Return the remaining number of second of the count-down.

Returns
The remaining number of second.

◆ reset()

void Nectunia.Utility.CountDown.reset ( )

Reset the count-down.

◆ start()

void Nectunia.Utility.CountDown.start ( )

Start the count-down.