This page has been translated automatically.
Setting Up Development Environment
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
Double Precision Coordinates
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
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.

GameEvent Class

The event call class.

The GameEvent class implementation can be found in the data/framework/game/event_system.h file.

GameEvent Class


void setEnabled(int mode)

Toggles an event enabled or disabled.


  • int mode - 1 if an event is enabled; otherwise 0.

int isEnabled()

Returns a value indicating if an event is enabled or not.

Return value

1 if an event is enabled; otherwise 0.

string getName()

Returns an event name.

Return value

Event name.

GameEvent(string name)

Constructor. Creates a new GameEvent class instance with a specified name.


  • string name - Event name.

void run()

Runs the event calls for all of the subscribers.

void run(Entity ret[])

Runs the event calls for the specified entities.


  • Entity ret[] - Array of entities.

void subscribe(GameCallback callback)

Subscribes a callback to an event.


  • GameCallback callback - Game callback.

void unsubscribe(variable instance, string function, int num_args = 0)

Unsubscribes a callback from an event.


  • variable instance - User class instance, for which the callback function is called. If the callback function is static, then the return value is NULL.
  • string function - Name of the callback function.
  • int num_args - Number of function arguments.
Last update: 2017-07-03
Build: ()