/// <summary> /// Clone transformations. /// </summary> public Transformations(Transformations other) { Position = other.Position; Rotation = other.Rotation; Scale = other.Scale; TransformOrder = other.TransformOrder; RotationOrder = other.RotationOrder; RotationType = other.RotationType; }
/// <summary> /// Clone transformations. /// </summary> public Transformations(Transformations other) { // set values from other Position = other.Position; Rotation = other.Rotation; Scale = other.Scale; TransformOrder = other.TransformOrder; RotationOrder = other.RotationOrder; RotationType = other.RotationType; // count the object creation Utils.CountAndAlert.Count(Utils.CountAndAlert.PredefAlertTypes.AddedOrCreated); }
public override void startTask() { //ViewObject.startObjects.current = 0; //current = 0; GameObject[] objs; objs = new GameObject[parentObject.transform.childCount]; Array.Sort(objs); int i = 0; foreach (Transform child in parentObject.transform) { objs[i] = child.gameObject; i++; } if (order) { // Deal with specific ordering TransformOrder ordered = order.GetComponent("TransformOrder") as TransformOrder; if (ordered) { Debug.Log("ordered"); Debug.Log(ordered.order.Count); if (ordered.order.Count > 0) { objs = ordered.order.ToArray(); } } } if (shuffle) { Experiment.Shuffle(objs); } TASK_START(); foreach (GameObject obj in objs) { objects.Add(obj); log.log("TASK_ADD "+ name + "\t" + this.GetType().Name + "\t" + obj.name + "\t" + "null", 1); } }
/// <summary> /// Create a new Instance /// </summary> /// <param name="o">The order of the Transform</param> public VectorTransformation(TransformOrder o) { this.o = o; trans = new Vector3f(); quat = Quaternion.Identity; }