public void moveToSpawnPosition(GenericOperator op) { if (op.GetType().Equals((typeof(NewOperator))) && op.Parents != null) { op.GetIcon().transform.position = op.Parents[0].GetIcon().transform.position + new Vector3(1, 0, 0); } if (op.Parents != null && op.Parents.Count > 0 && op.Parents[0].Children != null) { op.GetIcon().transform.position += new Vector3(0, (op.Parents[0].Children.Count - 1) * 0.3f, 0); } }
private void DestroyNewOperatorChildren(GenericOperator op) { if (op.GetType().Equals(typeof(NewOperator))) { Observer.DestroyOperator(op); } if (op.Children.Count == 0) { return; } else { DestroyNewOperatorChildren(op.Children[op.Children.Count - 1]); } }