Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes

Scheduler Class

Warning
Game Framework is deprecated and no longer supported. We can't guarantee the stable work of the framework.

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


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.

Scheduler()

Constructor. Creates a new Scheduler class instance.

void update(float ifps)

Updates a scheduler.

Arguments

  • float ifps - Inverse frame duration in seconds.
Last update: 2017-07-03