Tanoda
UndoTransform.cs
Go to the documentation of this file.
1using UnityEngine;
2using System.Collections;
3
4namespace GILES
5{
6 public class UndoTransform : IUndo
7 {
8 public Transform target;
9
10 public UndoTransform(Transform target)
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("transform", new pb_Transform(target));
20 HttpCookie.SetCookie("unsavedChanges", "true", "", "/", "", "");
21 return hash;
22 }
23
24 public void ApplyState(Hashtable values)
25 {
26 this.target = (Transform) values["target"];
27 pb_Transform ser = (pb_Transform) values["transform"];
28 this.target.SetTRS(ser);
29 }
30
31 public void OnExitScope() {}
32 }
33}
Hashtable RecordState()
UndoTransform(Transform target)
void ApplyState(Hashtable values)
void SetTRS(Transform trs)