protected override void Prepare() { gameObjectLayer = (GameObjectLayer)Global.world.GetLayer("GameObjectLayer"); guiLayer = (GUILayer)Global.world.GetLayer("GUILayer"); souls = new List <Soul>(); clickables = new List <IClickable>(); base.Prepare(); }
public BattleStage() { fighterLists = new List <FighterObject> [4]; for (int i = 0; i < 4; i++) { fighterLists[i] = new List <FighterObject>(); } gameObjectLayer = (GameObjectLayer)Global.world.GetLayer("GameObjectLayer"); }
protected override void Prepare() { timespan = 0; transforming = true; timePaused = true; player = Global.world.GetPlayer(); guiLayer = (GUILayer)Global.world.GetLayer("GUILayer"); gameObjectLayer = (GameObjectLayer)Global.world.GetLayer("GameObjectLayer"); topEffectLayer = (EffectLayer)Global.world.GetLayer("TopEffectLayer"); targetBuffer = new List <FighterObject>(); readiedFighterObjects = new Queue <FighterObject>(); readiedBuff = new Queue <BuffAction>(); deadEnemyObjects = new List <EnemyObject>(); player.Look(Direction.Up); player.Stand(); guiLayer.RemoveGUI("TeamManagement"); actionMenu = new ActionMenu("ActionMenu", null, MENUSTART_X, MENUSTART_Y); actionMenu.Deactivate(); guiLayer.AddGUI(actionMenu); actionSelect = new ActionSelect("ActionSelect", null, SELECTSTART_X, MENUSTART_Y, null); actionSelect.Deactivate(); guiLayer.AddGUI(actionSelect); instruction = new Label("Instruction", null, INSTRUCTION_X, INSTRUCTION_Y, "Select Target", Color.White, 512, Global.content.Load <SpriteFont>("neodgm24"), AlignType.Top, AlignType.Center); instruction.Deactivate(); guiLayer.AddGUI(instruction); stage = new BattleStage(); selector = new Selector(mirrorMode: true); selector.CreateNewMatrix("ActionMenuGroup", 1, 5); selector.CreateNewMatrix("ActionSelectGroup", 1, 1); selector.CreateNewMatrix("FighterGroup", Global.Properties.FIGHTER_IN_ROW, 4); // Two for NullFighterObject. // Key setting keyActions.Add(new KeyAction(Keys.W, pressed: () => { selector.SelectNext(Direction.Up); })); keyActions.Add(new KeyAction(Keys.S, pressed: () => { selector.SelectNext(Direction.Down); })); keyActions.Add(new KeyAction(Keys.A, pressed: () => { if (selector.matrixName == "ActionSelectGroup") { actionSelect.Next(Direction.Left); } else { selector.SelectNext(Direction.Left); } })); keyActions.Add(new KeyAction(Keys.D, pressed: () => { if (selector.matrixName == "ActionSelectGroup") { actionSelect.Next(Direction.Right); } else { selector.SelectNext(Direction.Right); } })); keyActions.Add(new KeyAction(Keys.E, pressed: () => { selector.SelectAction(); })); keyActions.Add(new KeyAction(Keys.Q, pressed: () => { Rewind(); })); base.Prepare(); }