Inventory Engine
v4.0
|
This component lets you very easily have one property drive the value of another property. More...
Inherits MonoBehaviour.
Public Member Functions | |
delegate void | OnValueChangeDelegate () |
a delegate to handle value changes More... | |
Public Attributes | |
bool | Emitting = true |
MMPropertyEmitter | EmitterProperty |
the property whose value you want to read and to have drive the ReceiverProperty's value More... | |
MMPropertyReceiver | ReceiverProperty |
the property whose value you want to be driven by the EmitterProperty's value More... | |
OnValueChangeDelegate | OnValueChange |
what to do on value change More... | |
Protected Member Functions | |
virtual void | Awake () |
On Awake we initialize both properties More... | |
virtual void | Update () |
On Update we emit our value to our receiver More... | |
virtual void | EmitValue () |
If needed, reads the current level of the emitter and sets it to the receiver More... | |
Protected Attributes | |
float | _levelLastFrame |
This component lets you very easily have one property drive the value of another property.
To do so, drag the object with the property you want to "read" from into the Emitter Property slot, then select the component the property is on, and finally the property itself. Then drag the object with the property you want to "write" to into the ReceiverProperty slot, and pick the property you want to drive with the emitter's value.
|
protectedvirtual |
On Awake we initialize both properties
|
protectedvirtual |
If needed, reads the current level of the emitter and sets it to the receiver
delegate void MoreMountains.Tools.MMEmmiterReceiver.OnValueChangeDelegate | ( | ) |
a delegate to handle value changes
|
protectedvirtual |
On Update we emit our value to our receiver
|
protected |
MMPropertyEmitter MoreMountains.Tools.MMEmmiterReceiver.EmitterProperty |
the property whose value you want to read and to have drive the ReceiverProperty's value
bool MoreMountains.Tools.MMEmmiterReceiver.Emitting = true |
OnValueChangeDelegate MoreMountains.Tools.MMEmmiterReceiver.OnValueChange |
what to do on value change
MMPropertyReceiver MoreMountains.Tools.MMEmmiterReceiver.ReceiverProperty |
the property whose value you want to be driven by the EmitterProperty's value