NGUI: Next-Gen UI kit
3.7.2
|
Delegate callback that Unity can serialize and set via Inspector. More...
Classes | |
class | Parameter |
Delegates can have parameters, and this class makes it possible to save references to properties that can then be passed as function arguments, such as transform.position or widget.color. More... | |
Public Member Functions | |
delegate void | Callback () |
EventDelegate () | |
EventDelegate (Callback call) | |
EventDelegate (MonoBehaviour target, string methodName) | |
override bool | Equals (object obj) |
Equality operator. More... | |
override int | GetHashCode () |
Used in equality operators. More... | |
void | Set (MonoBehaviour target, string methodName) |
Set the delegate callback using the target and method names. More... | |
bool | Execute () |
Execute the delegate, if possible. This will only be used when the application is playing in order to prevent unintentional state changes. More... | |
void | Clear () |
Clear the event delegate. More... | |
override string | ToString () |
Convert the delegate to its string representation. More... | |
Static Public Member Functions | |
static void | Execute (List< EventDelegate > list) |
Execute an entire list of delegates. More... | |
static bool | IsValid (List< EventDelegate > list) |
Convenience function to check if the specified list of delegates can be executed. More... | |
static EventDelegate | Set (List< EventDelegate > list, Callback callback) |
Assign a new event delegate. More... | |
static void | Set (List< EventDelegate > list, EventDelegate del) |
Assign a new event delegate. More... | |
static EventDelegate | Add (List< EventDelegate > list, Callback callback) |
Append a new event delegate to the list. More... | |
static EventDelegate | Add (List< EventDelegate > list, Callback callback, bool oneShot) |
Append a new event delegate to the list. More... | |
static void | Add (List< EventDelegate > list, EventDelegate ev) |
Append a new event delegate to the list. More... | |
static void | Add (List< EventDelegate > list, EventDelegate ev, bool oneShot) |
Append a new event delegate to the list. More... | |
static bool | Remove (List< EventDelegate > list, Callback callback) |
Remove an existing event delegate from the list. More... | |
static bool | Remove (List< EventDelegate > list, EventDelegate ev) |
Remove an existing event delegate from the list. More... | |
Public Attributes | |
bool | oneShot = false |
Whether the event delegate will be removed after execution. More... | |
Properties | |
MonoBehaviour | target [get, set] |
Event delegate's target object. More... | |
string | methodName [get, set] |
Event delegate's method name. More... | |
Parameter[] | parameters [get] |
Optional parameters if the method requires them. More... | |
bool | isValid [get] |
Whether this delegate's values have been set. More... | |
bool | isEnabled [get] |
Whether the target script is actually enabled. More... | |
Delegate callback that Unity can serialize and set via Inspector.
EventDelegate.EventDelegate | ( | ) |
EventDelegate.EventDelegate | ( | Callback | call | ) |
EventDelegate.EventDelegate | ( | MonoBehaviour | target, |
string | methodName | ||
) |
|
static |
Append a new event delegate to the list.
|
static |
Append a new event delegate to the list.
|
static |
Append a new event delegate to the list.
|
static |
Append a new event delegate to the list.
delegate void EventDelegate.Callback | ( | ) |
void EventDelegate.Clear | ( | ) |
Clear the event delegate.
override bool EventDelegate.Equals | ( | object | obj | ) |
Equality operator.
bool EventDelegate.Execute | ( | ) |
Execute the delegate, if possible. This will only be used when the application is playing in order to prevent unintentional state changes.
|
static |
Execute an entire list of delegates.
override int EventDelegate.GetHashCode | ( | ) |
Used in equality operators.
|
static |
Convenience function to check if the specified list of delegates can be executed.
|
static |
Remove an existing event delegate from the list.
|
static |
Remove an existing event delegate from the list.
void EventDelegate.Set | ( | MonoBehaviour | target, |
string | methodName | ||
) |
Set the delegate callback using the target and method names.
|
static |
Assign a new event delegate.
|
static |
Assign a new event delegate.
override string EventDelegate.ToString | ( | ) |
Convert the delegate to its string representation.
bool EventDelegate.oneShot = false |
Whether the event delegate will be removed after execution.
|
get |
Whether the target script is actually enabled.
|
get |
Whether this delegate's values have been set.
|
getset |
Event delegate's method name.
|
get |
Optional parameters if the method requires them.
|
getset |
Event delegate's target object.