Bottle 2D - Lua API 1.0.0
All you need to create games using bottle2D.
|
Chronometer event, to send event on each frame while the time is not elapsed, see Screen::RegisterChronometer to register a chronometer event. More...
#include <header.hpp>
Public Member Functions | |
number | GetTotalTime () |
Get the total time that the chronometer should count (when total time is elapsed, ratio is 1). | |
nil | SetTotalTime (number totalTime) |
Set the total time that the chronometer should count (when total time is elapsed, ratio is 1). | |
number | GetRatio () |
Get the current time ratio(elapsed time / total time). | |
nil | SetRatio (number newRatio) |
Force the chronometer to force its current ratio. | |
nil | Restart () |
Restart the chronometer (set ratio and elapsed time to 0). | |
nil | Start () |
Start the chronometer. | |
nil | Stop () |
Stop / pause the chronometer. | |
bool | IsRunning () |
Return true if the chronometer is running, false overwise. | |
Public Attributes | |
float | totalTime |
Access the total time that the chronometer should count (when total time is elapsed, ratio is 1). | |
float | ratio |
Access the current time ratio(elapsed time / total time). |
Chronometer event, to send event on each frame while the time is not elapsed, see Screen::RegisterChronometer to register a chronometer event.
number Chronometer::GetRatio | ( | ) |
Get the current time ratio(elapsed time / total time).
number Chronometer::GetTotalTime | ( | ) |
Get the total time that the chronometer should count (when total time is elapsed, ratio is 1).
bool Chronometer::IsRunning | ( | ) |
Return true if the chronometer is running, false overwise.
nil Chronometer::Restart | ( | ) |
Restart the chronometer (set ratio and elapsed time to 0).
nil Chronometer::SetRatio | ( | number | newRatio | ) |
Force the chronometer to force its current ratio.
nil Chronometer::SetTotalTime | ( | number | totalTime | ) |
Set the total time that the chronometer should count (when total time is elapsed, ratio is 1).
nil Chronometer::Start | ( | ) |
Start the chronometer.
nil Chronometer::Stop | ( | ) |
Stop / pause the chronometer.
float Chronometer::ratio |
Access the current time ratio(elapsed time / total time).
float Chronometer::totalTime |
Access the total time that the chronometer should count (when total time is elapsed, ratio is 1).