This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Bounds-Related Classes
Containers
Controls-Related Classes
Core Library
Engine-Related Classes
GUI-Related Classes
Node-Related Classes
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Utility Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

FrequencyGroup Class

This class provides time spreading of the periodic function calls.

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

FrequencyGroup Class

Members


FrequencyGroup (int frequency, int base_frequency)

Constructor. Creates a new FrequencyGroup class instance with the certain number of ticks.

Arguments

  • int frequency - Group frequency.
  • int base_frequency - The maximum frequency of the scheduler system.

void appendTask (GameCallback task)

Appends a new callback to a frequency group for time spreading.

Arguments

  • GameCallback task - Callback to append.

int getNumTasks ()

Returns the number of function callbacks.

Return value

Number of of function callbacks.

GameCallback getTask (int i)

Returns a callback from the frequency group by its index.

Arguments

  • int i - Callback index.

Return value

Game callback.

int getFrequency ()

Returns a call frequency of the functions in the frequency group.

Return value

Call frequency.

GameCallback find (string key)

Searches a callback in the frequency group by using a unique key.

Arguments

  • string key - Unique key.

Return value

Game callback.

void update (GameCallback tasks[], int sort[])

Collects functions, which are called in the current tick (1/60 seconds).

Arguments

  • GameCallback tasks[] - Array of the functions.
  • int sort[] - Priorities of the functions.
Last update: 2017-07-03
Build: ()