C# Class EventBroadcaster, PocketGodsRPG_Proto

Afficher le fichier Open project: pocket-playlab/PocketGodsRPG_Proto Class Usage Examples

Méthodes publiques

Méthode Description
AddObserver ( string notificationName, System action ) : void
AddObserver ( string notificationName, System action ) : void

Adds an observer to listen to specified by notification name

PostEvent ( string notificationName ) : void

Posts an event specified by name that does not require any parameters. Observers associated with this event will be called.

PostEvent ( string notificationName, Parameters, parameters ) : void

Posts an event specified by name that requires parameters. Observers associated with this event will be called. Requires the parameters class to be passed.

PrintObservers ( ) : void
RemoveActionAtObserver ( string notificationName, System action ) : void

Removes the action at observer specified by notification name

RemoveActionAtObserver ( string notificationName, System action ) : void

Removes the action at observer specified by notification name

RemoveAllObservers ( ) : void

Removes all observers.

RemoveObserver ( string notificationName ) : void

Removes all observers under the specified notification name

Private Methods

Méthode Description
EventBroadcaster ( ) : System.Collections

Method Details

AddObserver() public méthode

public AddObserver ( string notificationName, System action ) : void
notificationName string
action System
Résultat void

AddObserver() public méthode

Adds an observer to listen to specified by notification name
public AddObserver ( string notificationName, System action ) : void
notificationName string
action System
Résultat void

PostEvent() public méthode

Posts an event specified by name that does not require any parameters. Observers associated with this event will be called.
public PostEvent ( string notificationName ) : void
notificationName string
Résultat void

PostEvent() public méthode

Posts an event specified by name that requires parameters. Observers associated with this event will be called. Requires the parameters class to be passed.
public PostEvent ( string notificationName, Parameters, parameters ) : void
notificationName string
parameters Parameters,
Résultat void

PrintObservers() public méthode

public PrintObservers ( ) : void
Résultat void

RemoveActionAtObserver() public méthode

Removes the action at observer specified by notification name
public RemoveActionAtObserver ( string notificationName, System action ) : void
notificationName string Notification name.
action System Action.
Résultat void

RemoveActionAtObserver() public méthode

Removes the action at observer specified by notification name
public RemoveActionAtObserver ( string notificationName, System action ) : void
notificationName string Notification name.
action System Action.
Résultat void

RemoveAllObservers() public méthode

Removes all observers.
public RemoveAllObservers ( ) : void
Résultat void

RemoveObserver() public méthode

Removes all observers under the specified notification name
public RemoveObserver ( string notificationName ) : void
notificationName string Notification name.
Résultat void