Uses the MessageSystem to keep data synchronized between a source and a listener.
More...
|
void | OnMessage (MessageArgs messageArgs) |
| Handles messages requesting to change the value of the data source.
|
|
void | DataSourceValueChanged (object newValue) |
| When the data source has changed its value, it should call this method to inform listeners.
|
|
|
const string | DataSourceValueChangedMessage = "Data Source Value Changed" |
| Message that data source sends to inform listeners that the value changed.
|
|
const string | RequestDataSourceChangeValueMessage = "Request Data Source Change Value" |
| Message that listeners send to request this data synchronizer to change the data source's value.
|
|
Uses the MessageSystem to keep data synchronized between a source and a listener.
◆ DataSourceValueChanged()
void PixelCrushers.DataSynchronizer.DataSourceValueChanged |
( |
object |
newValue | ) |
|
|
inline |
When the data source has changed its value, it should call this method to inform listeners.
- Parameters
-
newValue | The data source's new value. |
◆ OnDisable()
virtual void PixelCrushers.DataSynchronizer.OnDisable |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ OnEnable()
virtual void PixelCrushers.DataSynchronizer.OnEnable |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ OnMessage()
void PixelCrushers.DataSynchronizer.OnMessage |
( |
MessageArgs |
messageArgs | ) |
|
|
inline |
Handles messages requesting to change the value of the data source.
On receipt of the RequestDataSourceChangeValueMessage, invokes the onRequestDataSourceChangeValue event, passing the first argument of the message as the new value.
- Parameters
-
messageArgs | First argument is the new value. |
Implements PixelCrushers.IMessageHandler.
◆ DataSourceValueChangedMessage
const string PixelCrushers.DataSynchronizer.DataSourceValueChangedMessage = "Data Source Value Changed" |
|
static |
Message that data source sends to inform listeners that the value changed.
◆ RequestDataSourceChangeValueMessage
const string PixelCrushers.DataSynchronizer.RequestDataSourceChangeValueMessage = "Request Data Source Change Value" |
|
static |
Message that listeners send to request this data synchronizer to change the data source's value.
◆ dataSourceName
string PixelCrushers.DataSynchronizer.dataSourceName |
|
getset |
A name to associate with the data source.
Data change messages that reference this name will invoke the value update events.
◆ onRequestDataSourceChangeValue
Event to send to data source to request it to change value.
The documentation for this class was generated from the following file:
- C:/Dev/Quest Machine/Dev/Source/Assets/Plugins/Pixel Crushers/Common/Scripts/Message System/DataSynchronizer.cs