C# Класс EventDelegate, TheUnseen

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

Открытые свойства

Свойство Тип Описание
oneShot bool

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

Метод Описание
Add ( List list, Callback, callback ) : void

Append a new event delegate to the list.

Add ( List list, Callback, callback, bool oneShot ) : void

Append a new event delegate to the list.

Add ( List list, EventDelegate, ev ) : void

Append a new event delegate to the list.

Add ( List list, EventDelegate, ev, bool oneShot ) : void

Append a new event delegate to the list.

Clear ( ) : void

Clear the event delegate.

Equals ( object obj ) : bool

Equality operator.

EventDelegate ( ) : System.Reflection
EventDelegate ( Callback, call ) : System.Reflection
EventDelegate ( MonoBehaviour target, string methodName ) : System.Reflection
Execute ( ) : bool

Execute the delegate, if possible. This will only be used when the application is playing in order to prevent unintentional state changes.

Execute ( List list ) : void

Execute an entire list of delegates.

GetHashCode ( ) : int

Used in equality operators.

IsValid ( List list ) : bool

Convenience function to check if the specified list of delegates can be executed.

Remove ( List list, Callback, callback ) : bool

Remove an existing event delegate from the list.

Set ( List list, Callback, callback ) : void

Assign a new event delegate.

Set ( MonoBehaviour target, string methodName ) : void

Set the delegate callback using the target and method names.

ToString ( ) : string

Convert the delegate to its string representation.

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

Метод Описание
Get ( ) : Callback,

Convert the saved target and method name into an actual delegate.

GetMethodName ( Callback, callback ) : string

GetMethodName is not supported on some platforms.

IsValid ( Callback, callback ) : bool
Set ( Callback, call ) : void

Set the delegate callback directly.

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

Add() статический публичный Метод

Append a new event delegate to the list.
static public Add ( List list, Callback, callback ) : void
list List
callback Callback,
Результат void

Add() статический публичный Метод

Append a new event delegate to the list.
static public Add ( List list, Callback, callback, bool oneShot ) : void
list List
callback Callback,
oneShot bool
Результат void

Add() статический публичный Метод

Append a new event delegate to the list.
static public Add ( List list, EventDelegate, ev ) : void
list List
ev EventDelegate,
Результат void

Add() статический публичный Метод

Append a new event delegate to the list.
static public Add ( List list, EventDelegate, ev, bool oneShot ) : void
list List
ev EventDelegate,
oneShot bool
Результат void

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

Clear the event delegate.
public Clear ( ) : void
Результат void

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

Equality operator.
public Equals ( object obj ) : bool
obj object
Результат bool

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

public EventDelegate ( ) : System.Reflection
Результат System.Reflection

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

public EventDelegate ( Callback, call ) : System.Reflection
call Callback,
Результат System.Reflection

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

public EventDelegate ( MonoBehaviour target, string methodName ) : System.Reflection
target MonoBehaviour
methodName string
Результат System.Reflection

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

Execute the delegate, if possible. This will only be used when the application is playing in order to prevent unintentional state changes.
public Execute ( ) : bool
Результат bool

Execute() статический публичный Метод

Execute an entire list of delegates.
static public Execute ( List list ) : void
list List
Результат void

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

Used in equality operators.
public GetHashCode ( ) : int
Результат int

IsValid() статический публичный Метод

Convenience function to check if the specified list of delegates can be executed.
static public IsValid ( List list ) : bool
list List
Результат bool

Remove() статический публичный Метод

Remove an existing event delegate from the list.
static public Remove ( List list, Callback, callback ) : bool
list List
callback Callback,
Результат bool

Set() статический публичный Метод

Assign a new event delegate.
static public Set ( List list, Callback, callback ) : void
list List
callback Callback,
Результат void

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

Set the delegate callback using the target and method names.
public Set ( MonoBehaviour target, string methodName ) : void
target MonoBehaviour
methodName string
Результат void

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

Convert the delegate to its string representation.
public ToString ( ) : string
Результат string

Описание свойств

oneShot публичное свойство

Whether the event delegate will be removed after execution.
public bool oneShot
Результат bool