//Store snapshots void StoreActorState() { if (objectSnapshot == null && transformSnapshot == null) { objectSnapshot = new ObjectSnapshot(actor); transformSnapshot = new TransformSnapshot(actor, TransformSnapshot.StoreMode.All); } }
//Restore snapshots void RestoreActorState() { if (objectSnapshot != null) { objectSnapshot.Restore(); objectSnapshot = null; } if (transformSnapshot != null) { transformSnapshot.Restore(); transformSnapshot = null; } }
//Store snapshots void Store() { objectSnapshot = new ObjectSnapshot(actor); transformSnapshot = new TransformSnapshot(actor, TransformSnapshot.StoreMode.All); }