C# Class EventDispatcher, NanoGUI

Used to connect publishers and subscriptions in a game. All thats needed for subscribers is the key their waiting for publishing from, as well as the handler they want to run when a publish is triggered. A Publishers will need a key for what subscibers should subscribe to, and a gameObject that is associated with the publish.
ファイルを表示 Open project: hxflyer/NanoGUI Class Usage Examples

Public Properties

Property Type Description
id string

Protected Properties

Property Type Description
_dispatchList List
_listenList List

Public Methods

Method Description
EventDispatcher ( ) : System.Collections
addEventListner ( string eventType, CallBack, function ) : void
dispatchEvent ( GuiEvent, e ) : void
removeEventListner ( string eventType, CallBack, function ) : void
sendEvents ( ) : void

Method Details

EventDispatcher() public method

public EventDispatcher ( ) : System.Collections
return System.Collections

addEventListner() public method

public addEventListner ( string eventType, CallBack, function ) : void
eventType string
function CallBack,
return void

dispatchEvent() public method

public dispatchEvent ( GuiEvent, e ) : void
e GuiEvent,
return void

removeEventListner() public method

public removeEventListner ( string eventType, CallBack, function ) : void
eventType string
function CallBack,
return void

sendEvents() public static method

public static sendEvents ( ) : void
return void

Property Details

_dispatchList protected_oe static_oe property

protected static List _dispatchList
return List

_listenList protected_oe property

protected List _listenList
return List

id public_oe property

public string id
return string