Tanoda
UndoOffsetHolder.cs
Go to the documentation of this file.
1using UnityEngine;
2using System.Collections;
3
4namespace GILES
5{
6 public class UndoOffsetHolder : IUndo
7 {
9
11 {
12 this.target = target;
13 }
14
15 public Hashtable RecordState()
16 {
17 Hashtable hash = new Hashtable();
18 hash.Add("target", target);
19 hash.Add("vector3", target.Offset);
20 hash.Add("rotvector3", target.Rotation);
21 hash.Add("leftvector3", target.LeftOffset);
22 hash.Add("leftrotvector3", target.LeftRotation);
23 HttpCookie.SetCookie("unsavedChanges", "true", "", "/", "", "");
24 return hash;
25 }
26
27 public void ApplyState(Hashtable values)
28 {
29 this.target = (OffsetHolder) values["target"];
30 this.target.Offset = (Vector3) values["vector3"];
31 this.target.Rotation = (Vector3) values["rotvector3"];
32 this.target.LeftOffset = (Vector3) values["leftvector3"];
33 this.target.LeftRotation = (Vector3) values["leftrotvector3"];
34 }
35
36 public void OnExitScope() {}
37 }
38}
void ApplyState(Hashtable values)
UndoOffsetHolder(OffsetHolder target)
Vector3 Offset
Definition: OffsetHolder.cs:7
Vector3 LeftRotation
Definition: OffsetHolder.cs:10
Vector3 Rotation
Definition: OffsetHolder.cs:8
Vector3 LeftOffset
Definition: OffsetHolder.cs:9