YaTimeComponent¶
Global singleton component for game time and timer events
Developers can use the exposed method implementing delayed logics
Use
YaTime
global object to access the APIsFunctions¶
TimeEventContainer WaitFor(number seconds)¶
ReturnsA container that hold the timer event
Wait for specified time and invoke a timer event (precision no lower than 0.1s)
seconds
seconds to wait
1 2 3 |
|
TimeEventContainer ScheduleAtInterval(number startSeconds, number intervalSeconds)¶
ReturnsA container that hold the timer event
Schedule a periodically invoked timer event (precision no lower than 0.1s)
startSeconds
seconds to wait before the first timer event is invokedintervalSeconds
seconds to wait between two continuous timer event (this value must not be less than 0.1)
1 2 3 4 5 |
|