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
Core Library
Containers
Engine Classes
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

GameEvent Class

The event call class.

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

GameEvent Class

Members


GameEvent (string name)

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

Arguments

  • string name - Event name.

string getName ()

Returns an event name.

Return value

Event name.

int isEnabled ()

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

Return value

1 if an event is enabled; otherwise 0.

void setEnabled (int mode)

Toggles an event enabled or disabled.

Arguments

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

void subscribe (GameCallback callback)

Subscribes a callback to an event.

Arguments

  • GameCallback callback - Game callback.

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

Unsubscribes a callback from an event.

Arguments

  • 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.

void run ()

Runs the event calls for all of the subscribers.

void run (Entity ret[])

Runs the event calls for the specified entities.

Arguments

  • Entity ret[] - Array of entities.
Last update: 03.07.2017
Build: ()