forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 1
class_timer
reduz edited this page Feb 23, 2014
·
9 revisions
####Inherits: Node ####Category: Core
- void set_wait_time ( real time_sec )
- real get_wait_time ( ) const
- void set_one_shot ( bool enable )
- bool is_one_shot ( ) const
- void set_autostart ( bool enable )
- bool has_autostart ( ) const
- void start ( )
- void stop ( )
- real get_time_left ( ) const
- timeout ( )
Timer node. This is a simple node that will emit a timeout callback when the timer runs out. It can optinally be set to loop.
- void set_wait_time ( real time_sec )
Set wait time. When the time is over, it will emit timeout signal.
- real get_wait_time ( ) const
Return the wait time. When the time is over, it will emit timeout signal.
- void set_one_shot ( bool enable )
Set as one-shot. If true, timer will stop after timeout, otherwise it will automatically restart.
- bool is_one_shot ( ) const
Return true if is set as one-shot. If true, timer will stop after timeout, otherwise it will automatically restart.
- void set_autostart ( bool enable )
Set to automatically start when entering the scene.
- bool has_autostart ( ) const
Return true if set to automatically start when entering the scene.
- void start ( )
Start the timer.
- void stop ( )
Stop (cancel) the timer.
- real get_time_left ( ) const
Return the time left for timeout if the timer is active.