C# Class EventDelegate, TheUnseen

Datei anzeigen Open project: henryj41043/TheUnseen Class Usage Examples

Public Properties

Property Type Description
oneShot bool

Public Methods

Method Description
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.

Private Methods

Method Description
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.

Method Details

Add() static public method

Append a new event delegate to the list.
static public Add ( List list, Callback, callback ) : void
list List
callback Callback,
return void

Add() static public method

Append a new event delegate to the list.
static public Add ( List list, Callback, callback, bool oneShot ) : void
list List
callback Callback,
oneShot bool
return void

Add() static public method

Append a new event delegate to the list.
static public Add ( List list, EventDelegate, ev ) : void
list List
ev EventDelegate,
return void

Add() static public method

Append a new event delegate to the list.
static public Add ( List list, EventDelegate, ev, bool oneShot ) : void
list List
ev EventDelegate,
oneShot bool
return void

Clear() public method

Clear the event delegate.
public Clear ( ) : void
return void

Equals() public method

Equality operator.
public Equals ( object obj ) : bool
obj object
return bool

EventDelegate() public method

public EventDelegate ( ) : System.Reflection
return System.Reflection

EventDelegate() public method

public EventDelegate ( Callback, call ) : System.Reflection
call Callback,
return System.Reflection

EventDelegate() public method

public EventDelegate ( MonoBehaviour target, string methodName ) : System.Reflection
target MonoBehaviour
methodName string
return System.Reflection

Execute() public method

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
return bool

Execute() static public method

Execute an entire list of delegates.
static public Execute ( List list ) : void
list List
return void

GetHashCode() public method

Used in equality operators.
public GetHashCode ( ) : int
return int

IsValid() static public method

Convenience function to check if the specified list of delegates can be executed.
static public IsValid ( List list ) : bool
list List
return bool

Remove() static public method

Remove an existing event delegate from the list.
static public Remove ( List list, Callback, callback ) : bool
list List
callback Callback,
return bool

Set() static public method

Assign a new event delegate.
static public Set ( List list, Callback, callback ) : void
list List
callback Callback,
return void

Set() public method

Set the delegate callback using the target and method names.
public Set ( MonoBehaviour target, string methodName ) : void
target MonoBehaviour
methodName string
return void

ToString() public method

Convert the delegate to its string representation.
public ToString ( ) : string
return string

Property Details

oneShot public_oe property

Whether the event delegate will be removed after execution.
public bool oneShot
return bool