C# Класс EventBroadcaster, PocketGodsRPG_Proto

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
EventBroadcaster ( ) : System.Collections

Описание методов

AddObserver() публичный Метод

public AddObserver ( string notificationName, System action ) : void
notificationName string
action System
Результат void

AddObserver() публичный Метод

Adds an observer to listen to specified by notification name
public AddObserver ( string notificationName, System action ) : void
notificationName string
action System
Результат void

PostEvent() публичный Метод

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
Результат void

PostEvent() публичный Метод

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,
Результат void

PrintObservers() публичный Метод

public PrintObservers ( ) : void
Результат void

RemoveActionAtObserver() публичный Метод

Removes the action at observer specified by notification name
public RemoveActionAtObserver ( string notificationName, System action ) : void
notificationName string Notification name.
action System Action.
Результат void

RemoveActionAtObserver() публичный Метод

Removes the action at observer specified by notification name
public RemoveActionAtObserver ( string notificationName, System action ) : void
notificationName string Notification name.
action System Action.
Результат void

RemoveAllObservers() публичный Метод

Removes all observers.
public RemoveAllObservers ( ) : void
Результат void

RemoveObserver() публичный Метод

Removes all observers under the specified notification name
public RemoveObserver ( string notificationName ) : void
notificationName string Notification name.
Результат void