Example #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public MenuScreen(string menuTitle)
        {
            this.menuTitle = menuTitle;

            menuUp = new InputAction(
                new Buttons[] { Buttons.DPadUp, Buttons.LeftThumbstickUp },
                new Keys[] { Keys.Up },
                true);
            menuDown = new InputAction(
                new Buttons[] { Buttons.DPadDown, Buttons.LeftThumbstickDown },
                new Keys[] { Keys.Down },
                true);
            menuSelect = new InputAction(
                new Buttons[] { Buttons.A, Buttons.Start },
                new Keys[] { Keys.Enter, Keys.Space },
                true);
            menuCancel = new InputAction(
                new Buttons[] { Buttons.B, Buttons.Back },
                new Keys[] { Keys.Escape },
                true);
            menuLeft = new InputAction(
                new Buttons[] { Buttons.DPadLeft, Buttons.LeftThumbstickLeft },
                new Keys[] { Keys.Left },
                true
                );
            menuRight = new InputAction(
                new Buttons[] { Buttons.DPadRight, Buttons.LeftThumbstickRight },
                new Keys[] { Keys.Right },
                true
                );

            position = new Vector2(0f, 175f);
        }
Example #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public GameplayScreen()
        {
            TransitionOnTime = TimeSpan.FromSeconds(1.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            pauseAction = new InputAction(
                new Buttons[] { Buttons.Start, Buttons.Back },
                new Keys[] { Keys.Escape },
                true);
        }
Example #3
0
        /// <summary>
        /// Constructor automatically includes the standard "A=ok, B=cancel"
        /// usage text prompt.
        /// </summary>
        public RankingScreen()
        {
            IsPopup = true;

            TransitionOnTime = TimeSpan.FromSeconds(0.2);
            TransitionOffTime = TimeSpan.FromSeconds(0.2);

            menuSelect = new InputAction(
                new Buttons[] { Buttons.X, Buttons.Start },
                new Keys[] { Keys.Space, Keys.Enter },
                true);
        }
Example #4
0
        public MessageBoxScreen()
        {
            IsPopup = true;

            menuSelect = new InputAction(
                new Buttons[] { Buttons.A, Buttons.Start },
                new Keys[] { Keys.Space, Keys.Enter },
                true);
            menuCancel = new InputAction(
                new Buttons[] { Buttons.B, Buttons.Back },
                new Keys[] { Keys.Escape, Keys.Back },
                true);
        }
Example #5
0
        public PopupScreen(Game game, Character character)
        {
            cursor = (Cursor)game.Services.GetService(typeof(Cursor));
            playerManager = (PlayerManager)game.Services.GetService(typeof(PlayerManager));
            screenManager = (ScreenManager)game.Services.GetService(typeof(ScreenManager));
            map = (BattleMap)game.Services.GetService(typeof(BattleMap));
            gameStateManager = (GameStateManager)game.Services.GetService(typeof(GameStateManager));

            selectedChar = character;
            selectScreen = new SelectScreen(game, character);
            screenManager.AddScreen(selectScreen, null);

            const string usageText = "A: Move" + "\nX: Attack" + "\nStart: End Turn" + "\nB: Cancel";
            this.message = message + usageText;
            if (selectedChar == null)
            {
                this.message = "Start: End Turn" + "\nB: Cancel";
            }
            else if (selectedChar.CharType == "champion")
            {
                this.message += "\nY: Buy Mercenary";
            }
            IsPopup = true;

            TransitionOnTime = TimeSpan.FromSeconds(0.2);
            TransitionOffTime = TimeSpan.FromSeconds(0.2);

                menuMove = new InputAction(
                    new Buttons[] { Buttons.A },
                    new Keys[] { Keys.A },
                    true);
                menuAttack = new InputAction(
                    new Buttons[] { Buttons.X, },
                    new Keys[] { Keys.X },
                    true);
                menuCancel = new InputAction(
                    new Buttons[] { Buttons.B, },
                    new Keys[] { Keys.B },
                    true);
                menuEndTurn = new InputAction(
                    new Buttons[] { Buttons.Start, },
                    new Keys[] { Keys.Enter },
                    true);
                menuBuy = new InputAction(
                    new Buttons[] { Buttons.Y, },
                    new Keys[] { Keys.Y },
                    true);
        }
Example #6
0
        public OptionsScreen(Game1 game)
        {
            const string usageText = "Play Against AI?\n"
                                        + "A: Yes B: No";
            this.message = message + usageText;

            IsPopup = true;

            TransitionOnTime = TimeSpan.FromSeconds(0.2);
            TransitionOffTime = TimeSpan.FromSeconds(0.2);

            menuAccept = new InputAction(
                new Buttons[] { Buttons.A },
                new Keys[] { Keys.A },
                true);
            menuCancel = new InputAction(
                new Buttons[] { Buttons.B },
                new Keys[] { Keys.B },
                true);

            this.game = game;
        }
Example #7
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public MenuScreen(string menuTitle)
        {
            this.menuTitle = menuTitle;

            TransitionOnTime = TimeSpan.FromSeconds(0.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            menuUp = new InputAction(
                new Buttons[] { Buttons.DPadUp, Buttons.LeftThumbstickUp },
                new Keys[] { Keys.Up },
                true);
            menuDown = new InputAction(
                new Buttons[] { Buttons.DPadDown, Buttons.LeftThumbstickDown },
                new Keys[] { Keys.Down },
                true);
            menuSelect = new InputAction(
                new Buttons[] { Buttons.A, Buttons.Start },
                new Keys[] { Keys.Enter, Keys.Space },
                true);
            menuCancel = new InputAction(
                new Buttons[] { Buttons.B, Buttons.Back },
                new Keys[] { Keys.Escape },
                true);
        }
Example #8
0
        /// <summary>
        /// Constructor lets the caller specify whether to include the standard
        /// "A=ok, B=cancel" usage text prompt.
        /// </summary>
        public MessageBoxScreen(string message, bool includeUsageText)
        {
            const string usageText = "\nA button, Space, Enter = ok" +
                                     "\nB button, Esc = cancel";

            if (includeUsageText)
                this.message = message + usageText;
            else
                this.message = message;

            IsPopup = true;

            TransitionOnTime = TimeSpan.FromSeconds(0.2);
            TransitionOffTime = TimeSpan.FromSeconds(0.2);

            menuSelect = new InputAction(
                new Buttons[] { Buttons.A, Buttons.Start },
                new Keys[] { Keys.Space, Keys.Enter },
                true);
            menuCancel = new InputAction(
                new Buttons[] { Buttons.B, Buttons.Back },
                new Keys[] { Keys.Escape, Keys.Back },
                true);
        }
Example #9
0
        public override void LoadContent()
        {
            base.LoadContent();
            ContentManager content = GameServices.GetService<ContentManager>();
            _backgroundTexture = content.Load<Texture2D>("Images/bgNew");
            _loadingMessage = content.Load<Texture2D>("Images/PimpScreen/loadingMessage");
            _switchTip = content.Load<Texture2D>("Images/PimpScreen/tutorialSwitchMessage");
            _readyToPlayMessage = content.Load<Texture2D>("Images/PimpScreen/startGameMessage");

            _tutorials = new Texture2D[6];
            _tutorials[0] = content.Load<Texture2D>("Images/PimpScreen/tutorial0");
            _tutorials[1] = content.Load<Texture2D>("Images/PimpScreen/game_controls");
            _tutorials[2] = content.Load<Texture2D>("Images/PimpScreen/tutorial1");
            _tutorials[3] = content.Load<Texture2D>("Images/PimpScreen/tutorial2");
            _tutorials[4] = content.Load<Texture2D>("Images/PimpScreen/tutorial3");
            _tutorials[5] = content.Load<Texture2D>("Images/PimpScreen/tutorial4");

            Viewport viewport = ScreenManager.GraphicsDevice.Viewport;
            _currentPosition = new Rectangle(1920/2 - 300, 1080/2 - 500, 600, 150);
            _switchTipPosition = new Rectangle(1920 / 2 - 850, 1080 / 2 + 400, 500, 150);

            _tutorialsPosition = new Rectangle[6];
            _tutorialsPosition[0] = new Rectangle(0, 0, 1920, 1080);
            _tutorialsPosition[1] = new Rectangle(1920 / 2 - 450, 1080 / 2 - 300, 900, 581);
            _tutorialsPosition[2] = new Rectangle(0, 0, 1920, 1080);
            _tutorialsPosition[3] = new Rectangle(0, 0, 1920, 1080);
            _tutorialsPosition[4] = new Rectangle(0, 0, 1920, 1080);
            _tutorialsPosition[5] = new Rectangle(0, 0, 1920, 1080);

            _currentTexture = _loadingMessage;

            StartAction = new InputAction(
                    new Buttons[] { Buttons.A },
                    new Keys[] { Keys.A },
                    true);

            switchTutorialAction = new InputAction(new Buttons[] { Buttons.X }, new Keys[] { Keys.X }, true);
        }