This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Scheduler Class

The Scheduler class provides scheduling of the periodic call of the function or group of functions and their automatic time spreading. The call frequency can vary from 1 to 60 times per second.

The Scheduler class implementation can be found in the data/framework/game/scheduler.h file.

Scheduler Class

Members


Scheduler ()

Constructor. Creates a new Scheduler class instance.

void update (float ifps)

Updates a scheduler.

Arguments

  • float ifps - Inverse frame duration in seconds.

void setPeriodicUpdate (variable instanse, string function, int frequency, int priority, variable arg0 = 0, variable arg1 = 0, variable arg2 = 0, variable arg3 = 0)

Sets the periodic update for the function.

Arguments

  • variable instanse - User class instance, for which the function is called. If the function is static, pass the NULL value.
  • string function - Function name.
  • int frequency - Frequency of the function call. The frequency takes on the values from 1 to 60.
  • int priority - Priority of the function call.
  • variable arg0 - Function argument, optional.
  • variable arg1 - Function argument, optional.
  • variable arg2 - Function argument, optional.
  • variable arg3 - Function argument, optional.

void removePeriodicUpdate (variable instanse, string function, int num_args = 0)

Removes the periodic update of the function.

Arguments

  • variable instanse - User class instance, for which the function is called. If the function is static, pass the NULL value.
  • string function - Function name.
  • int num_args = 0 - Number of function arguments.
Last update: 03.07.2017
Build: ()