class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectNode Timer
A countdown timer.

Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode.

timeout timeout<>():timeout

Emitted when the timer reaches the end.

Enum TimerProcessCallback<>():Enum

TIMER_PROCESS_PHYSICS = 0

Update the timer every physics process frame (see Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS).


TIMER_PROCESS_IDLE = 1

Update the timer every process (rendered) frame (see Node.NOTIFICATION_INTERNAL_PROCESS).

bool autostart<>():bool

If true, the timer will start immediately when it enters the scene tree.

Note: After the timer enters the tree, this property is automatically set to false.

bool one_shot<>():bool

If true, the timer will stop after reaching the end. Otherwise, as by default, the timer will automatically restart.

bool paused<>():bool

If true, the timer is paused. A paused timer does not process until this property is set back to false, even when start is called.

TimerProcessCallback process_callback<>():TimerProcessCallback

Specifies when the timer is updated during the main loop (see TimerProcessCallback).

float time_left<>():float

The timer's remaining time in seconds. This is always 0 if the timer is stopped.

Note: This property is read-only and cannot be modified. It is based on wait_time.

float wait_time<>():float

The time required for the timer to end, in seconds. This property can also be set every time start is called.

Note: Timers can only process once per physics or process frame (depending on the process_callback). An unstable framerate may cause the timer to end inconsistently, which is especially noticeable if the wait time is lower than roughly 0.05 seconds. For very short timers, it is recommended to write your own code instead of using a Timer node. Timers are also affected by Engine.time_scale.

bool is_stopped<>():bool

Returns true if the timer is stopped or has not started.

void start<>( float=, float:=, ):void

Starts the timer, if it was not started already. Fails if the timer is not inside the tree. If time_sec is greater than 0, this value is used for the wait_time.

Note: This method does not resume a paused timer. See paused.

void stop<>():void

Stops the timer.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...