コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: ActionGroup.cs プロジェクト: Rainermv/CardGameMaker
        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
            }
        }
コード例 #3
0
 public void SetELSE(ActionGroup act)
 {
     ELSE = act;
     ELSE.ParentAction = this;
 }
コード例 #4
0
 public void SetTHEN(ActionGroup act)
 {
     THEN = act;
     THEN.ParentAction = this;
 }
コード例 #5
0
 public void SetIF(ActionGroup act)
 {
     IF = act;
     IF.ParentAction = this;
 }
コード例 #6
0
 public ActionIfThenElse() : base("If-Then-Else")
 {
     IF   = new ActionGroup("IF");
     THEN = new ActionGroup("THEN");
     ELSE = new ActionGroup("ELSE");
 }