This struct is passed to listeners of the MessageSystem when a message is sent. More...
Public Member Functions | |
MessageArgs (object sender, object target, string message, string parameter, object[] values=null) | |
MessageArgs (object sender, string message, string parameter, object[] values=null) | |
bool | Matches (string message, string parameter) |
bool | Matches (StringField message, StringField parameter) |
bool | Matches (StringField message, string parameter) |
bool | Matches (string message, StringField parameter) |
bool | IsRequiredSender (string requiredSender) |
Returns true if the args' sender matches a required sender. | |
bool | IsRequiredTarget (string requiredTarget) |
Returns true if the args' target matches a required target. | |
string | GetSenderString () |
Returns the string name of the sender. | |
string | GetTargetString () |
Returns the string name of the target. | |
Public Attributes | |
object | sender |
Reference to the message sender (e.g., GameObject or possibly custom-defined string ID). | |
object | target |
Reference to the message target (e.g., GameObject or possibly custom-defined string ID). | |
string | message |
string | parameter |
object[] | values |
Properties | |
bool | hasTarget [get] |
If true, the message arguments specify a target. | |
bool | isTargetString [get] |
True if the target value is a string or StringField. | |
string | targetString [get] |
If the target is a string or StringField, its value. | |
object | firstValue [get] |
int | intValue [get] |
This struct is passed to listeners of the MessageSystem when a message is sent.
|
inline |
|
inline |
|
inline |
Returns the string name of the sender.
|
inline |
Returns the string name of the target.
|
inline |
Returns true if the args' sender matches a required sender.
|
inline |
Returns true if the args' target matches a required target.
|
inline |
|
inline |
|
inline |
|
inline |
string PixelCrushers.MessageArgs.message |
string PixelCrushers.MessageArgs.parameter |
object PixelCrushers.MessageArgs.sender |
Reference to the message sender (e.g., GameObject or possibly custom-defined string ID).
object PixelCrushers.MessageArgs.target |
Reference to the message target (e.g., GameObject or possibly custom-defined string ID).
Typically null or blank string is interpreted as broadcast to all targets.
object [] PixelCrushers.MessageArgs.values |
|
get |
|
get |
If true, the message arguments specify a target.
|
get |
|
get |
True if the target value is a string or StringField.
|
get |
If the target is a string or StringField, its value.