8000 class_timer · fschmidt1970/godot Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
reduz edited this page Feb 23, 2014 · 9 revisions

Timer

####Inherits: Node ####Category: Core

Brief Description

Member Functions

Signals

  • timeout ( )

Description

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.

Member Function Description

  • 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.

Clone this wiki locally
0