Feel 5.9.1
The best way to improve your game's feel and make it extra juicy
Loading...
Searching...
No Matches
MoreMountains.Tools.MMGameEventListener Class Reference

Add this component to an object, and it'll let you easily trigger UnityEvents when the event of the specified name is triggered. More...

Inheritance diagram for MoreMountains.Tools.MMGameEventListener:
MoreMountains.Tools.MMEventListener< T > MoreMountains.Tools.MMEventListenerBase

Public Member Functions

void OnMMEvent (MMGameEvent gameEvent)
 When a MMGameEvent happens, we trigger our UnityEvent if necessary.
Public Member Functions inherited from MoreMountains.Tools.MMEventListener< T >
void OnMMEvent (T eventType)

Public Attributes

string EventName = "Load"
 the name of the event you want to listen for
UnityEvent OnMMGameEvent
 a UnityEvent hook you can use to call methods when the specified event gets triggered

Protected Member Functions

virtual void OnEnable ()
 On enable, we start listening for MMGameEvents. You may want to extend that to listen to other types of events.
virtual void OnDisable ()
 On disable, we stop listening for MMGameEvents. You may want to extend that to stop listening to other types of events.

Detailed Description

Add this component to an object, and it'll let you easily trigger UnityEvents when the event of the specified name is triggered.

Member Function Documentation

◆ OnDisable()

virtual void MoreMountains.Tools.MMGameEventListener.OnDisable ( )
protectedvirtual

On disable, we stop listening for MMGameEvents. You may want to extend that to stop listening to other types of events.

◆ OnEnable()

virtual void MoreMountains.Tools.MMGameEventListener.OnEnable ( )
protectedvirtual

On enable, we start listening for MMGameEvents. You may want to extend that to listen to other types of events.

◆ OnMMEvent()

void MoreMountains.Tools.MMGameEventListener.OnMMEvent ( MMGameEvent gameEvent)

When a MMGameEvent happens, we trigger our UnityEvent if necessary.

Parameters
gameEvent

Member Data Documentation

◆ EventName

string MoreMountains.Tools.MMGameEventListener.EventName = "Load"

the name of the event you want to listen for

◆ OnMMGameEvent

UnityEvent MoreMountains.Tools.MMGameEventListener.OnMMGameEvent

a UnityEvent hook you can use to call methods when the specified event gets triggered


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