HKI Core
Public Member Functions | Public Attributes | Private Attributes | List of all members
HKI.Core.GameEvents.GameEventListener Class Reference

This is the listener class for GameEvents. This class binds the Event with the callbacks (here called response) together. More...

Public Member Functions

 GameEventListener ()
 Constructor used for Unity Editor More...
 
 GameEventListener (GameEvent gameEvent)
 Constructor used by code. More...
 
void OnEventRaised ()
 This function should only be called by the GameEvent class. It invokes the callback functions of this listener. More...
 
void Enable ()
 This function enables the listern. This means it registers itself with the GameEvent to be informed if the Event is raised. More...
 
void Disable ()
 This function disables the listern. This means it unregisters itself from the GameEvent and will not be informed if the Event is raised. More...
 

Public Attributes

UnityEvent Response = new UnityEvent()
 

Private Attributes

GameEvent Event = null
 

Detailed Description

This is the listener class for GameEvents. This class binds the Event with the callbacks (here called response) together.

Definition at line 10 of file GameEventListener.cs.

Constructor & Destructor Documentation

◆ GameEventListener() [1/2]

HKI.Core.GameEvents.GameEventListener.GameEventListener ( )
inline

Constructor used for Unity Editor

Definition at line 20 of file GameEventListener.cs.

◆ GameEventListener() [2/2]

HKI.Core.GameEvents.GameEventListener.GameEventListener ( GameEvent  gameEvent)
inline

Constructor used by code.

Parameters
gameEvent

Definition at line 29 of file GameEventListener.cs.

Member Function Documentation

◆ Disable()

void HKI.Core.GameEvents.GameEventListener.Disable ( )
inline

This function disables the listern. This means it unregisters itself from the GameEvent and will not be informed if the Event is raised.

Definition at line 57 of file GameEventListener.cs.

◆ Enable()

void HKI.Core.GameEvents.GameEventListener.Enable ( )
inline

This function enables the listern. This means it registers itself with the GameEvent to be informed if the Event is raised.

Definition at line 46 of file GameEventListener.cs.

◆ OnEventRaised()

void HKI.Core.GameEvents.GameEventListener.OnEventRaised ( )
inline

This function should only be called by the GameEvent class. It invokes the callback functions of this listener.

Definition at line 38 of file GameEventListener.cs.

Member Data Documentation

◆ Event

GameEvent HKI.Core.GameEvents.GameEventListener.Event = null
private

Definition at line 13 of file GameEventListener.cs.

◆ Response

UnityEvent HKI.Core.GameEvents.GameEventListener.Response = new UnityEvent()

Definition at line 14 of file GameEventListener.cs.


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