public bool ChangeSavingTransform(SavingTransform other) { if (!Equals(other)) { CopyTransform(other); return true; } return false; }
public RemoteObject(string path, params System.Type[] components) { gameObject = new GameObject(path, components); this.path = path; lastUpdate = new SavingTransform(gameObject.transform); }
public void CopyTransform(SavingTransform other) { Position = new Vector3(other.Position.x, other.Position.y, other.Position.z); Scale = new Vector3(other.Scale.x, other.Scale.y, other.Scale.z); Rotation = new Quaternion(other.Rotation.x, other.Rotation.y, other.Rotation.z, other.Rotation.w); }
// Use this for initialization void Start() { // lastMousePosition = Input.mousePosition; objectInitialState = new SavingTransform(); objectInitialState.Position = new Vector3(transform.position.x, transform.position.y, transform.position.z); objectInitialState.Rotation = new Quaternion(transform.rotation.x, transform.rotation.y, transform.rotation.z, transform.rotation.w); objectInitialState.Scale = new Vector3(transform.localScale.x, transform.localScale.y, transform.localScale.z); objectZoom = transform.localScale; currentAction = InteractiveObjectAction.NO_ACTION; }