AireEngine
A 3D Open-World Game Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Aire::GameObject Struct Referenceabstract

#include <event.h>

Inheritance diagram for Aire::GameObject:
Inheritance graph
[legend]

Public Member Functions

virtual void onEvent (const Event &e)=0
 
virtual ~GameObject ()
 Destructor ensures that on deletion, the object if unregistered from all events.
 

Detailed Description

Base game object class. To be inherited by game objects that are required to be responsive to game events.

To become responsive to an event, the game object must first be registered to the event type through the EventManager.

Member Function Documentation

◆ onEvent()

virtual void Aire::GameObject::onEvent ( const Event & e)
pure virtual

Event handler to be called when an event is triggered. The handler will be called only if the game object is registered for the event. Override this method for custom event handling.

Parameters
eThe event that triggered the handler.

Implemented in BoidController, MyPlayer, and BoidStateMachine.


The documentation for this struct was generated from the following file: