Tanoda
|
Public Member Functions | |
UndoInstantiate (GameObject go) | |
Hashtable | RecordState () |
void | ApplyState (Hashtable hash) |
void | OnExitScope () |
Hashtable | RecordState () |
void | ApplyState (Hashtable values) |
void | OnExitScope () |
Public Attributes | |
GameObject | gameObject |
Undo support for creating new gameObjects in scene. Call after instantiating an object.
Definition at line 11 of file UndoInstantiate.cs.
GILES.UndoInstantiate.UndoInstantiate | ( | GameObject | go | ) |
Definition at line 16 of file UndoInstantiate.cs.
void GILES.UndoInstantiate.ApplyState | ( | Hashtable | values | ) |
Apply the recorded state to the target object using the values stored by RecordState.
Implements GILES.IUndo.
Definition at line 31 of file UndoInstantiate.cs.
void GILES.UndoInstantiate.OnExitScope | ( | ) |
Called when a state is purged from the undo or redo stack. Commonly used by objects to release memory once no longer needed.
Implements GILES.IUndo.
Definition at line 37 of file UndoInstantiate.cs.
Hashtable GILES.UndoInstantiate.RecordState | ( | ) |
Record the current state of the target object. RecordState() should grab the current state of the object pointed to, not the current state as stored.
RecordState should return a hashtable that contains all the information necessary to reconstitute the object. How the data is stored is up to the implementation, since it is also left to the implementing class to reconstruct itself using this same information in ApplyState.
Implements GILES.IUndo.
Definition at line 22 of file UndoInstantiate.cs.
GameObject GILES.UndoInstantiate.gameObject |
Definition at line 13 of file UndoInstantiate.cs.