コード例 #1
0
        public UI_PlayerSelectCharacters(A3RData a3RData, endSelectStage endSelectStage)
            : base(a3RData, endSelectStage)
        {
            _background = new UI_StaticImage(Camera, 0, 0, SwinGame.BitmapNamed("shopBg"));
            AddElement(_background);

            _playerText = new UI_Text(Camera, Width(0.5f), Height(0.38f),
                                      Color.Black, "Player X:", true);
            AddElement(_playerText);

            AddElement(new UI_Text(A3RData.Camera, Width(0.5f), Height(0.35f),
                                   Color.Black, "Select a Character", true));
            UI_Button _uiButton;

            _uiButton                      = new UI_Button(A3RData.Camera, "G.W. Tiger", Width(0.25f), Height(0.5f), new UIEventArgs("gwt"));
            _uiButton.OnUIEvent           += CharacterButtonPressed;
            _uiButton.MouseOverSoundEffect = SwinGame.SoundEffectNamed("menuSound");
            _uiButton.MiddleAligned        = true;
            AddElement(_uiButton);

            _uiButton                      = new UI_Button(A3RData.Camera, "Object 15X", Width(0.5f), Height(0.5f), new UIEventArgs("obj"));
            _uiButton.OnUIEvent           += CharacterButtonPressed;
            _uiButton.MouseOverSoundEffect = SwinGame.SoundEffectNamed("menuSound");
            _uiButton.MiddleAligned        = true;
            AddElement(_uiButton);

            _uiButton                      = new UI_Button(A3RData.Camera, "Innocentia", Width(0.75f), Height(0.5f), new UIEventArgs("int"));
            _uiButton.OnUIEvent           += CharacterButtonPressed;
            _uiButton.MouseOverSoundEffect = SwinGame.SoundEffectNamed("menuSound");
            _uiButton.MiddleAligned        = true;
            AddElement(_uiButton);
        }
コード例 #2
0
        public UI_PlayerSelectTemplate(A3RData a3RData, endSelectStage endSelectStage) : base(a3RData)
        {
            _endSelectStage = endSelectStage;


            _menuLogo = new UI_StaticImage(Camera, Width(0.45f), Height(0.14f),
                                           SwinGame.BitmapNamed("menuLogo"));
            AddElement(_menuLogo);
        }
コード例 #3
0
        public UI_PlayerSelectNumberPlayers(A3RData a3RData, endSelectStage endSelectStage)
            : base(a3RData, endSelectStage)
        {
            _background = new UI_StaticImage(Camera, 0, 0, SwinGame.BitmapNamed("shopBg"));
            AddElement(_background);

            AddElement(new UI_Text(Camera, Width(0.5f), Height(0.35f),
                                   Color.Black, "Number of players:", true));
            A3RData.NumberOfPlayers = 0;
        }
コード例 #4
0
ファイル: UI_MainMenu.cs プロジェクト: Mikanwolfe/Artillery3
        public UI_MainMenu(A3RData a3RData) : base(a3RData)
        {
            AddElement(new UI_StaticImage(Camera, 0, 0, SwinGame.BitmapNamed("shopBg")));
            Rectangle _windowRect = A3RData.WindowRect;

            AddElement(new UI_StaticImage(Camera, 0, 0, SwinGame.BitmapNamed("fullBg")));

            UI_DynamicImage _menuGradient = new UI_DynamicImage(A3RData.Camera, -20, 0, -5000, 0, 10, SwinGame.BitmapNamed("menuLeftWhite"));

            AddElement(_menuGradient);

            _menuGradient = new UI_DynamicImage(A3RData.Camera, 0, 0, -5000, 0, 10, SwinGame.BitmapNamed("menuGradientFull"));
            AddElement(_menuGradient);

            _menuGradient = new UI_DynamicImage(A3RData.Camera, 0, 0, -8000, 0, 15, SwinGame.BitmapNamed("menuGradientHalf"));
            AddElement(_menuGradient);

            UI_StaticImage _menuLogo = new UI_StaticImage(a3RData.Camera, _windowRect.Width * 0.022f, _windowRect.Height * 0.24f, SwinGame.BitmapNamed("menuLogo"));

            AddElement(_menuLogo);

            _playButton = new UI_Button(a3RData.Camera, "New Game", _windowRect.Width * 0.026f, _windowRect.Height * 0.417f, UIEvent.StartGame,
                                        SwinGame.BitmapNamed("startButton"), SwinGame.BitmapNamed("startButtonSelected"));
            _playButton.OnUIEvent           += UserInterface.Instance.NotifyUIEvent;
            _playButton.MouseOverSoundEffect = SwinGame.SoundEffectNamed("menuSound");
            AddElement(_playButton);

            _playButton = new UI_Button(a3RData.Camera, "Load Game", _windowRect.Width * 0.026f, _windowRect.Height * 0.466f, UIEvent.StartGame,
                                        SwinGame.BitmapNamed("loadButton"), SwinGame.BitmapNamed("loadButtonSelected"));
            _playButton.OnUIEvent           += UserInterface.Instance.NotifyUIEvent;
            _playButton.MouseOverSoundEffect = SwinGame.SoundEffectNamed("menuSound");
            AddElement(_playButton);

            _playButton = new UI_Button(a3RData.Camera, "Test Text", _windowRect.Width * 0.026f, _windowRect.Height * 0.520f, UIEvent.StartGame,
                                        SwinGame.BitmapNamed("optionsButton"), SwinGame.BitmapNamed("optionsButtonSelected"));
            _playButton.OnUIEvent           += UserInterface.Instance.NotifyUIEvent;
            _playButton.MouseOverSoundEffect = SwinGame.SoundEffectNamed("menuSound");
            AddElement(_playButton);

            _playButton = new UI_Button(a3RData.Camera, "Exit", _windowRect.Width * 0.026f, _windowRect.Height * 0.572f, UIEvent.Exit,
                                        SwinGame.BitmapNamed("exitButton"), SwinGame.BitmapNamed("exitButtonSelected"));
            _playButton.OnUIEvent           += UserInterface.Instance.NotifyUIEvent;
            _playButton.MouseOverSoundEffect = SwinGame.SoundEffectNamed("menuSound");
            AddElement(_playButton);
        }
コード例 #5
0
        public UI_ShopMenu(A3RData a3RData, NotifyPlayerFinishedShop notifyPlayerFinishedShop)
            : base(a3RData)
        {
            _notifyPlayerFinishedShop = notifyPlayerFinishedShop;

            _shopBackground = SwinGame.BitmapNamed("shopBg");

            AddElement(new UI_StaticImage(a3RData.Camera, Width(0.5f), Height(0.24f), SwinGame.BitmapNamed("menuLogo")));

            _characterBox = new UI_Box(A3RData, 300, 200, new Vector(20, 20));
            _statBox      = new UI_TextBox(A3RData, 300, 370, new Vector(20, 240));
            _equipBox     = new UI_EquipBox(A3RData, 300, 750, new Vector(Width(1) - 320, 20), RefreshShopItems);

            UI_Button _nextButton = new UI_Button(Camera, "Next", Width(1) - 170, Height(1) - 60, FinishShopButton);

            _nextButton.Width = 300;
            _nextButton.MouseOverSoundEffect = SwinGame.SoundEffectNamed("menuSound");
            _nextButton.MiddleAligned        = true;
            _nextButton.LockToScreen();

            _fadeFx = new UI_StaticImage(Camera, 0, 0, SwinGame.BitmapNamed("fadeFx"));

            if (A3RData.EasterEggTriggered)
            {
                AddElement(new UI_StaticImage(a3RData.Camera, Width(0.5f), Height(-1f), SwinGame.BitmapNamed("ddlc")));
            }

            _playerName    = A3RData.SelectedPlayer.Name;
            _characterName = A3RData.SelectedPlayer.Character.Name;
            _shopItems     = new UI_ShopItems(A3RData, RefreshEquipBox);
            AddElement(_shopItems);

            AddElement(_nextButton);
            AddElement(_equipBox);
            AddElement(_characterBox);
            AddElement(_statBox);

            AddElement(new UI_HealthUpgradeButton(a3RData, 300, 60, new Vector(20, _statBox.Pos.Y + 390)));
            AddElement(new UI_ArmourUpgradeButton(a3RData, 300, 60, new Vector(20, _statBox.Pos.Y + 390 + 80)));

            AddElement(_fadeFx);

            _selPlayer = A3RData.SelectedPlayer;
        }
コード例 #6
0
        public UI_PlayerSelectNames(A3RData a3RData, endSelectStage endSelectStage)
            : base(a3RData, endSelectStage)
        {
            _background = new UI_StaticImage(Camera, 0, 0, SwinGame.BitmapNamed("shopBg"));
            AddElement(_background);


            _playerText = new UI_Text(Camera, Width(0.5f), Height(0.35f),
                                      Color.Black, "Player X:", true);
            AddElement(_playerText);

            _isComputerPlayer = new UI_CheckBox(Camera,
                                                new Vector(Width(0.59f), Height(0.397f)), "Computer Player?");

            AddElement(_isComputerPlayer);
            _inputMethodKey = new Dictionary <bool, IInputMethod>();
            _inputMethodKey.Add(true, new AIInputMethod());
            _inputMethodKey.Add(false, new PlayerInputMethod());
        }
コード例 #7
0
        public UI_PlayerSelect()
        {
            _stateComponent = new StateComponent <PlayerSelectState>(PlayerSelectState.ReadingNumberPlayers);

            _menuLogo = new UI_StaticImage(Width(0.45f), Height(0.14f), SwinGame.BitmapNamed("menuLogo"));
            AddElement(_menuLogo);

            textElement = new UI_Text(Width(0.5f), Height(0.35f),
                                      Color.Black, "Number of players:", true);
            AddElement(textElement);



            //start reading number players.
            SwinGame.StartReadingText(Color.Black, 20, SwinGame.FontNamed("guiFont"),
                                      (int)Width(0.5f), (int)Height(0.4f));

            _players = new List <Player>();
        }
コード例 #8
0
        public UI_PlayerSelect_Legacy(A3RData a3RData)
            : base(a3RData)
        {
            _stateComponent = new StateComponent <PlayerSelectState>(PlayerSelectState.ReadingNumberPlayers);

            _menuLogo = new UI_StaticImage(a3RData.Camera, Width(0.45f), Height(0.14f), SwinGame.BitmapNamed("menuLogo"));
            AddElement(_menuLogo);

            textElement = new UI_Text(a3RData.Camera, Width(0.5f), Height(0.35f),
                                      Color.Black, "Number of players:", true);
            AddElement(textElement);



            //start reading number players.
            SwinGame.StartReadingText(Color.Black, 20, SwinGame.FontNamed("guiFont"),
                                      (int)Width(0.5f), (int)Height(0.4f));

            _players = Artillery3R.Services.A3RData.Players;
        }
コード例 #9
0
ファイル: UI_MainMenu.cs プロジェクト: Mikanwolfe/Artillery3
        public UI_MainMenu()
        {
            UI_DynamicImage _menuGradient = new UI_DynamicImage(0, 0, -5000, 0, 10, SwinGame.BitmapNamed("menuGradientFull"));

            AddElement(_menuGradient);

            _menuGradient = new UI_DynamicImage(0, 0, -8000, 0, 15, SwinGame.BitmapNamed("menuGradientHalf"));
            AddElement(_menuGradient);

            UI_StaticImage _menuLogo = new UI_StaticImage(_windowRect.Width * 0.022f, _windowRect.Height * 0.24f, SwinGame.BitmapNamed("menuLogo"));

            AddElement(_menuLogo);

            _playButton = new UI_Button("New Game", _windowRect.Width * 0.026f, _windowRect.Height * 0.417f, UIEvent.StartGame,
                                        SwinGame.BitmapNamed("startButton"), SwinGame.BitmapNamed("startButtonSelected"));
            _playButton.OnUIEvent           += UserInterface.Instance.NotifyUIEvent;
            _playButton.MouseOverSoundEffect = SwinGame.SoundEffectNamed("menuSound");
            AddElement(_playButton);

            _playButton = new UI_Button("Load Game", _windowRect.Width * 0.026f, _windowRect.Height * 0.466f, UIEvent.StartGame,
                                        SwinGame.BitmapNamed("loadButton"), SwinGame.BitmapNamed("loadButtonSelected"));
            _playButton.OnUIEvent           += UserInterface.Instance.NotifyUIEvent;
            _playButton.MouseOverSoundEffect = SwinGame.SoundEffectNamed("menuSound");
            AddElement(_playButton);

            _playButton = new UI_Button("Test Text", _windowRect.Width * 0.026f, _windowRect.Height * 0.520f, UIEvent.StartGame,
                                        SwinGame.BitmapNamed("optionsButton"), SwinGame.BitmapNamed("optionsButtonSelected"));
            _playButton.OnUIEvent           += UserInterface.Instance.NotifyUIEvent;
            _playButton.MouseOverSoundEffect = SwinGame.SoundEffectNamed("menuSound");
            AddElement(_playButton);

            _playButton = new UI_Button("Exit", _windowRect.Width * 0.026f, _windowRect.Height * 0.572f, UIEvent.Exit,
                                        SwinGame.BitmapNamed("exitButton"), SwinGame.BitmapNamed("exitButtonSelected"));
            _playButton.OnUIEvent           += UserInterface.Instance.NotifyUIEvent;
            _playButton.MouseOverSoundEffect = SwinGame.SoundEffectNamed("menuSound");
            AddElement(_playButton);
        }