Пример #1
0
        public GameplayScreen(NetworkSession networkSession)
        {
            TransitionOnTime = TimeSpan.FromSeconds(1.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            _pauseAction = new InputAction(
                new Buttons[] { Buttons.Start, Buttons.Back },
                new Keys[] { Keys.Escape },
                true);

            _propertiesAction = new InputAction(
                new Buttons[] { Buttons.Y },
                new Keys[] { Keys.F1 },
                true);

            _gameManager = null;
            _networkSession = networkSession;

            _isPropertiesWindow = false;
        }
Пример #2
0
        public PropertiesMenuScreen(GameManager gameManager)
            : base("Properties")
        {
            _blurType = new MenuEntry("Normal Blur");
            _blur = new MenuEntry("Blur");
            _iceTransparency = new MenuEntry("Ice Transparecy");
            MenuEntry exit = new MenuEntry("Exit");

            _blurType.Selected += BlurTypeSelected;
            _blur.Selected += BlurSelected;
            _iceTransparency.Selected += TransparacySelected;
            exit.Selected += OnCancel;

            MenuEntries.Add(_blurType);
            MenuEntries.Add(_blur);
            MenuEntries.Add(_iceTransparency);
            MenuEntries.Add(exit);

            _menuSelected = (int)MenuSelected.NONE;
            _gameManager = gameManager;

            _upAction = new InputAction(
                new Buttons[] { Buttons.DPadUp },
                new Keys[] { Keys.Right },
                true);
            _downAction = new InputAction(
                new Buttons[] { Buttons.DPadDown },
                new Keys[] { Keys.Left },
                true);

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

            _ice = (Ice)_gameManager.getGameEntity("ice");
        }
Пример #3
0
        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);
        }
Пример #4
0
        public MessageBoxScreen(string message, bool includeUsageText)
        {
            const string usageText = "\nOK -> Button A or Enter" +
                                     "\nCANCEL -> Button B or Esc";

            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 },
                new Keys[] { Keys.Enter },
                true);
            menuCancel = new InputAction(
                new Buttons[] { Buttons.B },
                new Keys[] { Keys.Escape },
                true);
        }