XposeCraft  1.0.1-rc1
Public API for Arena Gameplay
XposeCraft.Game.GameEvent Class Reference

Event registered in the game system of events, triggering its anonymous function on GameEventType game event occurrence. More...

Public Member Functions

void UnregisterEvent ()
 Unregisters the registered GameEvent. More...
 

Static Public Member Functions

static GameEvent Register (GameEventType gameEventType, UnityAction< Arguments > function)
 Registers a new instance in the game event system to wait for the GameEventType occurrence. More...
 

Properties

bool IsRegistered [get]
 Returns true if the GameEvent was not unregistered yet. More...
 
GameEventType Type [get]
 Type of the GameEvent that has to occur in the Game in order for the scheduled function to be run. More...
 

Detailed Description

Event registered in the game system of events, triggering its anonymous function on GameEventType game event occurrence.

This function receives an event description in the form of Arguments.

Member Function Documentation

◆ Register()

static GameEvent XposeCraft.Game.GameEvent.Register ( GameEventType  gameEventType,
UnityAction< Arguments function 
)
static

Registers a new instance in the game event system to wait for the GameEventType occurrence.

Parameters
gameEventTypeType of the game event to get triggered on.
functionFunction to be executed on the event trigger, receiving an event description.
Returns
Registered event representation, which can be later used to unregister it.

◆ UnregisterEvent()

void XposeCraft.Game.GameEvent.UnregisterEvent ( )

Unregisters the registered GameEvent.

Property Documentation

◆ IsRegistered

bool XposeCraft.Game.GameEvent.IsRegistered
get

Returns true if the GameEvent was not unregistered yet.

◆ Type

GameEventType XposeCraft.Game.GameEvent.Type
get

Type of the GameEvent that has to occur in the Game in order for the scheduled function to be run.