public ChoiceScreen(MiGame game) : base(game) { if (Instance == null) { choices = new KeyValuePair <string, MiScript> [0]; activeChoice = 0; background = new MiAnimatingComponent(game, 0, 600, MiResolution.VirtualWidth, MiResolution.VirtualHeight - 600, 0, 0, 0, 0); cursor = new MiAnimatingComponent(game, 25, 0, 50, 20); inputResponses[Controller.A] = Pressed; inputResponses[Controller.UP] = Upped; inputResponses[Controller.DOWN] = Downed; inputResponses[Controller.START] = delegate { if (Game.ContainsScreen(BattleScreen.Instance) && BattleScreen.Instance.State == BattleScreen.BattleState.NOTIF && BattleScreen.Instance.SetupIndex >= Player.Party.Count) { BattleScreen.Instance.Undo(); } return(null); }; entryExitMutex = false; } else { throw new Exception("Message Screen Already Initialized"); } }
public BattleScreen(MiGame game, MiTileEngine tileEngine) : base(game) { if (Instance == null) { flash = new MiAnimatingComponent(Game, 0, 0, 1280, 800, 0, 0, 0, 0); this.tileEngine = tileEngine; inputResponses[Controller.START] = Escaped; inputResponses[Controller.LEFT] = Lefted; inputResponses[Controller.RIGHT] = Righted; inputResponses[Controller.UP] = Upped; inputResponses[Controller.DOWN] = Downed; inputResponses[Controller.A] = Pressed; positions = new Dictionary <Character, Point>(); cursor = new MiAnimatingComponent(game, 0, 0, 0, 0); cursor.Color = Color.Yellow; selectedValidMoves = new Dictionary <Point, int>(); selectedAOE = new Dictionary <Point, int>(); random = new Random(); } else { throw new Exception("Battle Screen Already Initialized"); } }
public LocationUI(MiGame game, int x, int y, int width, int height, LocationData location) { this.game = game; Neighbors = new Dictionary <MiControl, LocationUI>(); allyButtonBase = new MiAnimatingComponent(game, x, y, width, height); enemyButtonBase = new MiAnimatingComponent(game, x, y, width, height); neutralButtonBase = new MiAnimatingComponent(game, x, y, width, height); this.location = location; }
public MessageScreen(MiGame game) : base(game) { if (Instance == null) { background = new MiAnimatingComponent(game, 0, HEIGHT, MiResolution.VirtualWidth, MiResolution.VirtualHeight - HEIGHT, 0, 0, 0, 0); inputResponses[Controller.A] = ExitSequence; entryExitMutex = false; } else { throw new Exception("Dialog Screen Already Initialized"); } }
public StartScreen(MiGame game) : base(game) { if (Instance == null) { background = new MiAnimatingComponent(game, 0, 0, 1280, 800); cursor = new MiAnimatingComponent(game, 683, 328, 33, 35); // // New Game Button // newGameButton = new MiButton(); newGameButton.Pressed += delegate { WorldScreen.Instance.Activate(); return(null); }; newGameButtonBase = new MiAnimatingComponent(game, 733, 278, 502, 107); // // Quit Game Button // quitGameButton = new MiButton(); quitGameButton.Pressed += delegate { Game.Exit(); return(null); }; quitGameButtonBase = new MiAnimatingComponent(game, 750, 418, 488, 127, 0, 0, 0, 0); // // Default Active Button // ActiveButton = newGameButton; // // Reponses to Input // inputResponses[Controller.UP] = Upped; inputResponses[Controller.DOWN] = Downed; inputResponses[Controller.A] = Pressed; } else { throw new Exception("Start Screen Already Initialized"); } }
public TownScreen(MiGame game, MiTileEngine tileEngine) : base(game) { if (Instance == null) { playerAvatar = new MiAnimatingComponent(Game, 0, 0, tileEngine.TileWidth, tileEngine.TileHeight); PlayerMoveEnabled = true; this.tileEngine = tileEngine; inputResponses[Controller.START] = Escape; inputResponses[Controller.UP] = MoveUp; inputResponses[Controller.DOWN] = MoveDown; inputResponses[Controller.LEFT] = MoveLeft; inputResponses[Controller.RIGHT] = MoveRight; inputResponses[Controller.A] = ExamineFront; } else { throw new Exception("Town Screen Already Initialized"); } }
public WorldScreen(MiGame game) : base(game) { if (Instance == null) { background = new MiAnimatingComponent(game, 0, 0, 1280, 800); // // Create UI for Locations // LocationUI test_1 = new LocationUI(game, 150, 150, 64, 64, LocationData.TEST_1); LocationUI test_2 = new LocationUI(game, 150, 350, 64, 64, LocationData.courtyard); LocationUI test_3 = new LocationUI(game, 150, 550, 64, 64, LocationData.cafe); LocationUI test_4 = new LocationUI(game, 350, 150, 64, 64, LocationData.Erty); LocationUI test_5 = new LocationUI(game, 350, 350, 64, 64, LocationData.hall); LocationUI test_6 = new LocationUI(game, 350, 550, 64, 64, LocationData.HOME); LocationUI test_7 = new LocationUI(game, 550, 150, 64, 64, LocationData.mindclass); LocationUI test_8 = new LocationUI(game, 550, 350, 64, 64, LocationData.weaponclass); LocationUI test_9 = new LocationUI(game, 550, 550, 64, 64, LocationData.willclass); //LocationUI test_3 = new LocationUI(game, 650, 250, 128, 128, LocationData.TEST_3); LocationData.TEST_1.ControllingFaction = LocationData.State.ENEMY; // // Add Neighbors // test_1.Neighbors.Add(Controller.DOWN, test_2); test_1.Neighbors.Add(Controller.RIGHT, test_4); test_2.Neighbors.Add(Controller.UP, test_1); test_2.Neighbors.Add(Controller.DOWN, test_3); test_2.Neighbors.Add(Controller.RIGHT, test_5); test_3.Neighbors.Add(Controller.UP, test_2); test_3.Neighbors.Add(Controller.DOWN, test_4); test_3.Neighbors.Add(Controller.RIGHT, test_6); test_4.Neighbors.Add(Controller.UP, test_3); test_4.Neighbors.Add(Controller.DOWN, test_5); test_4.Neighbors.Add(Controller.RIGHT, test_7); test_5.Neighbors.Add(Controller.UP, test_4); test_5.Neighbors.Add(Controller.DOWN, test_6); test_5.Neighbors.Add(Controller.RIGHT, test_8); test_6.Neighbors.Add(Controller.UP, test_5); test_6.Neighbors.Add(Controller.DOWN, test_7); test_6.Neighbors.Add(Controller.RIGHT, test_9); test_7.Neighbors.Add(Controller.UP, test_6); test_7.Neighbors.Add(Controller.DOWN, test_8); test_7.Neighbors.Add(Controller.RIGHT, test_1); test_8.Neighbors.Add(Controller.UP, test_7); test_8.Neighbors.Add(Controller.DOWN, test_9); test_8.Neighbors.Add(Controller.RIGHT, test_2); test_9.Neighbors.Add(Controller.UP, test_8); test_9.Neighbors.Add(Controller.DOWN, test_1); test_9.Neighbors.Add(Controller.RIGHT, test_3); // // Add All Locations to Global List // allLocations = new List <LocationUI>(); allLocations.Add(test_1); allLocations.Add(test_2); allLocations.Add(test_3); allLocations.Add(test_4); allLocations.Add(test_5); allLocations.Add(test_6); allLocations.Add(test_7); allLocations.Add(test_8); allLocations.Add(test_9); // // Default Active Location // activeLocation = test_1; // // Cursor // cursor = new MiAnimatingComponent(game, activeLocation.ButtonBase.Position.X - 50, activeLocation.ButtonBase.Position.Y + 30, 33, 35); // // Responses to Input // inputResponses[Controller.UP] = Upped; inputResponses[Controller.DOWN] = Downed; inputResponses[Controller.LEFT] = Lefted; inputResponses[Controller.RIGHT] = Righted; inputResponses[Controller.A] = EnterLocation; inputResponses[Controller.START] = Escape; } else { throw new Exception("World Screen Already Initialized"); } }