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); }
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 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); }