public void ModifyOp(GameObject obj, RobotCreated_Operation_Name opName) { RobotCreated_Operation op = Operations.FindLast(x => x.Op == opName); if (op != null) { op.to_Pos = obj.transform.localPosition; op.to_Rot = obj.transform.localRotation; op.to_Scale = obj.transform.localScale; } }
private RobotCreated_Operation SetOpInfos(Btn_RobotCreated_Choosen choosen, RobotCreated_Operation_Name opName) { if (Operations.Count >= MaxCount) { Operations.RemoveAt(0); } if (choosen != null) { this.GetComponent <Button>().interactable = true; GameObject obj = choosen.myObj; RobotCreated_Operation op = new RobotCreated_Operation(); op.name = choosen.myObj.name.Replace("(Clone)", ""); op.controlObj = choosen; op.Op = opName; op.origin_Pos = obj.transform.localPosition; op.origin_Rot = obj.transform.localRotation; op.origin_Scale = obj.transform.localScale; Operations.Add(op); return(op); } return(null); }
private RobotCreated_Operation SetOpInfos(GameObject obj, RobotCreated_Operation_Name opName) { Btn_RobotCreated_Choosen choosen = root.ChoosenBtns.Find(x => x.myObj == obj); return(SetOpInfos(choosen, opName)); }
public void AddOp(GameObject obj, RobotCreated_Operation_Name opName) { SetOpInfos(obj, opName); Redo_Operations.Clear(); RedoBtn.interactable = false; }
public void AddOp(Btn_RobotCreated_Choosen choosen, RobotCreated_Operation_Name opName) { SetOpInfos(choosen, opName); Redo_Operations.Clear(); RedoBtn.interactable = false; }