Sample class showing how and where to call each function of the DeltaMonitor class. this class will check for changes in every enabled CheckForChangeAttribute variable, every update, and if a change is detected, call the user provided (via Unity Editor) callback function. To Use this class, the user must provide a valid callback Function. no special editor should be required for derived versions, since DeltaMonitor has a property drawer. As does UnityEvent. This class is marked as abstract because it does not contain any members with a DeltaAttribute. This keyword means, basically, that the programmer should derive his/her own class, from this one. That class should have members with DeltaAtribbutes
|
override void | DeltaDetected () |
| Override abstract base version to invoke the deltaDetectedCallBack UnityEvent.
|
|
virtual void | Reset () |
| Instantiates the changeMonitor class.
|
|
virtual void | Start () |
| Stores initial values for changeMonitor on Start. Also invokes DetectChanges() once, and resets changeMonitor's changeResult flag.
|
|
virtual void | Update () |
| checks if any DeltaAttributed variables have changed, and if so calls the abstract DelktaDetected function. It then resets the changed state of all variables for next update.
|
|