public override void CopyFrom(Action copy) { base.CopyFrom(copy); ActionIfThenElse copyite = copy as ActionIfThenElse; this.IF = CGFactory.CreateCGInstance(copyite.IF.GetType().ToString()) as CGME.ActionGroup; this.IF.CopyFrom(copyite.IF); this.THEN = CGFactory.CreateCGInstance(copyite.THEN.GetType().ToString()) as CGME.ActionGroup; this.THEN.CopyFrom(copyite.THEN); this.ELSE = CGFactory.CreateCGInstance(copyite.ELSE.GetType().ToString()) as CGME.ActionGroup; this.ELSE.CopyFrom(copyite.ELSE); }
public override void CopyFrom(Action copy) { base.CopyFrom(copy); ActionGroup copyGroup = copy as ActionGroup; foreach (Action copying_child in copyGroup.Children) { Action child = CGFactory.CreateCGInstance(copying_child.GetType().ToString()) as CGME.Action; child.CopyFrom(copying_child); this.AddAction(child); //copied_children.CopyFrom } }
public void SetELSE(ActionGroup act) { ELSE = act; ELSE.ParentAction = this; }
public void SetTHEN(ActionGroup act) { THEN = act; THEN.ParentAction = this; }
public void SetIF(ActionGroup act) { IF = act; IF.ParentAction = this; }
public ActionIfThenElse() : base("If-Then-Else") { IF = new ActionGroup("IF"); THEN = new ActionGroup("THEN"); ELSE = new ActionGroup("ELSE"); }