private void AddStageNode()
        {
            TreeNode newSt     = new Stage(parent.ActivatedWorkSpaceData);
            TreeNode newTask   = new TaskNode(parent.ActivatedWorkSpaceData);
            TreeNode newFolder = new Folder(parent.ActivatedWorkSpaceData, "Initialize");

            newFolder.AddChild(new StageBG(parent.ActivatedWorkSpaceData));
            newTask.AddChild(newFolder);
            newTask.AddChild(new TaskWait(parent.ActivatedWorkSpaceData, "240"));
            newSt.AddChild(newTask);
            parent.Insert(newSt);
        }
예제 #2
0
        private void AddStageNode()
        {
            TreeNode newSt     = new Stage(parent.ActivatedWorkSpaceData);
            TreeNode newTask   = new TaskNode(parent.ActivatedWorkSpaceData);
            TreeNode newFolder = new Folder(parent.ActivatedWorkSpaceData, "Initialize");

            newFolder.AddChild(new Code(parent.ActivatedWorkSpaceData,
                                        "LoadMusic(\'spellcard\',\'THlib\\\\music\\\\spellcard.ogg\',75,0xc36e80/44100/4)"));
            newFolder.AddChild(new StageBG(parent.ActivatedWorkSpaceData, "bamboo_background"));
            newTask.AddChild(newFolder);
            newTask.AddChild(new TaskWait(parent.ActivatedWorkSpaceData, "60"));
            newTask.AddChild(new PlayBGM(parent.ActivatedWorkSpaceData, "\"spellcard\"", "", "false"));
            newTask.AddChild(new TaskWait(parent.ActivatedWorkSpaceData, "180"));
            newSt.AddChild(newTask);
            parent.Insert(newSt);
        }
        internal TreeNode GetTreeNodes(DocumentData documentData)
        {
            TreeNode root    = null;
            TreeNode curr    = null;
            int      currpos = 0;

            foreach (Node n in nodes)
            {
                TreeNode t = n.GetTreeNode(documentData);
                if (root == null)
                {
                    root = t;
                }
                else
                {
                    curr.InsertChild(t, currpos);
                }
                if (n is AdvancedRepeat)
                {
                    curr    = t;
                    currpos = 1;
                }
            }

            BossDefine newDef = new BossDefine(documentData);

            newDef.Name = "random";
            TreeNode      init  = new BossInit(documentData);
            BossSpellCard newSC = new BossSpellCard(documentData);

            newSC.Name = $"CARD_{seed}";
            TreeNode newSCStart = new BossSCStart(documentData);
            TreeNode newTask    = new TaskNode(documentData);

            newSCStart.AddChild(newTask);
            newTask.AddChild(new TaskMoveTo(documentData, "0,120", "60", "MOVE_NORMAL"));

            newTask.AddChild(root);

            newSC.AddChild(newSCStart);
            newSC.AddChild(new BossSCFinish(documentData));
            newDef.AddChild(init);
            newDef.AddChild(newSC);

            return(newDef);
        }
        private void AddDefineLaserNode()
        {
            TreeNode newDef    = new LaserDefine(parent.ActivatedWorkSpaceData);
            TreeNode newInit   = new LaserInit(parent.ActivatedWorkSpaceData);
            TreeNode newTask   = new TaskNode(parent.ActivatedWorkSpaceData);
            TreeNode newTurnOn = new LaserTurnOn(parent.ActivatedWorkSpaceData);

            newTask.AddChild(newTurnOn);
            newInit.AddChild(newTask);
            newDef.AddChild(newInit);
            parent.Insert(newDef);
        }
예제 #5
0
        private void AddBossSCNode()
        {
            TreeNode newSC      = new BossSpellCard(parent.ActivatedWorkSpaceData);
            TreeNode newSCStart = new BossSCStart(parent.ActivatedWorkSpaceData);
            TreeNode newTask    = new TaskNode(parent.ActivatedWorkSpaceData);

            newSCStart.AddChild(newTask);
            newTask.AddChild(new TaskMoveTo(parent.ActivatedWorkSpaceData, "0,120", "60", "MOVE_NORMAL"));
            newSC.AddChild(newSCStart);
            newSC.AddChild(new BossSCFinish(parent.ActivatedWorkSpaceData));
            parent.Insert(newSC);
        }
        private void AddDefineBossNode()
        {
            TreeNode newDef            = new BossDefine(parent.ActivatedWorkSpaceData);
            TreeNode init              = new BossInit(parent.ActivatedWorkSpaceData);
            TreeNode newSC             = new BossSpellCard(parent.ActivatedWorkSpaceData);
            TreeNode newSCBeforeStart  = new BossSCBeforeStart(parent.ActivatedWorkSpaceData);
            TreeNode newSCStart        = new BossSCStart(parent.ActivatedWorkSpaceData);
            TreeNode newTask           = new TaskNode(parent.ActivatedWorkSpaceData);
            TreeNode newSCBeforeFinish = new BossSCBeforeFinish(parent.ActivatedWorkSpaceData);
            TreeNode newSCAfter        = new BossSCAfter(parent.ActivatedWorkSpaceData);

            newSCStart.AddChild(newTask);
            newTask.AddChild(new TaskMoveTo(parent.ActivatedWorkSpaceData, "0,120", "60", "MOVE_NORMAL"));
            newSC.AddChild(newSCBeforeStart);
            newSC.AddChild(newSCStart);
            newSC.AddChild(newSCBeforeFinish);
            newSC.AddChild(new BossSCFinish(parent.ActivatedWorkSpaceData));
            newSC.AddChild(newSCAfter);
            newDef.AddChild(init);
            newDef.AddChild(newSC);
            parent.Insert(newDef);
        }