-
Notifications
You must be signed in to change notification settings - Fork 1
timer_countdown
Inherits: base_timer
Inherited By: timer_countdown_time
timer_countdown is the script that counts down from a given second to 0.
Type | Name | Default Value |
---|---|---|
float | _time_set | |
float | _time_current |
Return Type | Name |
---|---|
void | set_time( float time_seconds ) |
bool | is_timer_done() |
float | normalized() |
float | get_current_time_seconds() |
void | reset_timer() |
void | stop_timer() |
float | get_time_seconds() |
void | update_timer(float delta) |
float _time_set
This property stores the main maximum time given to this script.
Note: The time is stored in seconds.
float _time_current
This property is the time that will count down to 0
Note: The count down time is done in seconds.
void set_time ( float time_seconds )
This method sets/overrides the timer's time. Both _time_set and _time_current is set to the given time_seconds parameter value.
bool is_timer_done ()
This method checks if the timer is done counting down. True means the timer is done counting down. False means the timer is NOT done counting down.
Note: When counting down is done the property _time_current then equals to _time_set.
float normalized ()
This method gets the normalized value of the time in timer, range 0.0 - 1.0. This value can be used to synchronize with other features. The normalized value is calculated by dividing _time_current with _time_set.
float get_current_time_seconds ()
This method returns the value of _time_current.
This method resets the timer. This means _time_current will be set to 0.0.
This method stops the timer. The timer is stopped by making _time_current equal to _time_set.
float get_time_seconds ()
This method returns _time_set value.
void update_timer ( float delta )
This method updates the timer by counting down the timer. This method MUST be called from other scripts for the countdown to work.
- Tutorial Bar
- Tutorial Debug
- Tutorial Instantiate Object
- Tutorial Pool
- Tutorial Timer
- Tutorial Update Manager
- Tutorial Variable Creator
- Bars
- Debugs
- Maths
- Pools
- Resources
- Fixed Vars
- Managers
- Observers
- Vars
- Script Templates
- Timers
- Updates