-
Notifications
You must be signed in to change notification settings - Fork 0
class_timer
reduz edited this page Apr 10, 2014
·
10 revisions
####Inherits: Node ####Category: Core
- void set_wait_time ( float time_sec )
- float 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 ( )
- float 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 ( float time_sec )
Set wait time. When the time is over, it will emit timeout signal.
- float 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.
- float get_time_left ( ) const
Return the time left for timeout if the timer is active.