public override void LoadContent()
 {
     pause_screen = ScreenManager.Game.Content.Load<Texture2D>("OverlayScreens\\trainingComplete");
     screenManager = (ScreenManager)ScreenManager.Game.Services.GetService(typeof(ScreenManager));
 }
Пример #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            //Setup some basic input
            inputManager = new InputManager();
            inputManager.AddInput(InputAction.Selection, Keys.Enter);
            inputManager.AddInput(InputAction.Selection, Buttons.A);
            inputManager.AddInput(InputAction.Selection, Buttons.Start);

            //Menu Actions
            inputManager.AddInput(InputAction.MenuUp, Keys.Up);
            inputManager.AddInput(InputAction.MenuDown, Keys.Down);
            inputManager.AddInput(InputAction.MenuLeft, Keys.Left);
            inputManager.AddInput(InputAction.MenuRight, Keys.Right);
            inputManager.AddInput(InputAction.MenuSelect, Keys.Enter);
            inputManager.AddInput(InputAction.MenuCancel, Keys.Back);

            inputManager.AddInput(InputAction.MenuUp, Buttons.LeftThumbstickUp);
            inputManager.AddInput(InputAction.MenuDown, Buttons.LeftThumbstickDown);
            inputManager.AddInput(InputAction.MenuLeft, Buttons.LeftThumbstickLeft);
            inputManager.AddInput(InputAction.MenuRight, Buttons.LeftThumbstickRight);
            inputManager.AddInput(InputAction.MenuUp, Buttons.DPadUp);
            inputManager.AddInput(InputAction.MenuDown, Buttons.DPadDown);
            inputManager.AddInput(InputAction.MenuLeft, Buttons.DPadLeft);
            inputManager.AddInput(InputAction.MenuRight, Buttons.DPadRight);
            inputManager.AddInput(InputAction.MenuSelect, Buttons.A);
            inputManager.AddInput(InputAction.MenuCancel, Buttons.B);

            inputManager.AddInput(InputAction.ExitGame, Buttons.Back);
            inputManager.AddInput(InputAction.ExitGame, Keys.Escape);

            this.Services.AddService(typeof(InputManager), inputManager);

            //Movement Actions
            inputManager.AddInput(InputAction.TileMoveUp, Keys.T);
            inputManager.AddInput(InputAction.TileMoveDown, Keys.G);
            inputManager.AddInput(InputAction.TileMoveLeft, Keys.F);
            inputManager.AddInput(InputAction.TileMoveRight, Keys.H);

            inputManager.AddInput(InputAction.TileMoveUp, Buttons.LeftThumbstickUp);
            inputManager.AddInput(InputAction.TileMoveDown, Buttons.LeftThumbstickDown);
            inputManager.AddInput(InputAction.TileMoveLeft, Buttons.LeftThumbstickLeft);
            inputManager.AddInput(InputAction.TileMoveRight, Buttons.LeftThumbstickRight);

            //Tower Action
            inputManager.AddInput(InputAction.TowerBuild, Keys.Space);
            inputManager.AddInput(InputAction.TowerBuild, Buttons.A);
            inputManager.AddInput(InputAction.TowerDestroy, Keys.B);
            inputManager.AddInput(InputAction.TowerDestroy, Buttons.B);
            inputManager.AddInput(InputAction.TowerRepair, Keys.N);
            inputManager.AddInput(InputAction.TowerRepair, Buttons.Y);
            inputManager.AddInput(InputAction.TowerUpgrade, Keys.M);
            inputManager.AddInput(InputAction.TowerUpgrade, Buttons.X);

            //PlayerMenu
            inputManager.AddInput(InputAction.PlayerMenuLeft, Buttons.DPadLeft);
            inputManager.AddInput(InputAction.PlayerMenuRight, Buttons.DPadRight);
            inputManager.AddInput(InputAction.PlayerMenuUp, Buttons.DPadUp);
            inputManager.AddInput(InputAction.PlayerMenuDown, Buttons.DPadDown);
            inputManager.AddInput(InputAction.PlayerMenuLeft, Keys.J);
            inputManager.AddInput(InputAction.PlayerMenuRight, Keys.L);
            inputManager.AddInput(InputAction.PlayerMenuUp, Keys.I);
            inputManager.AddInput(InputAction.PlayerMenuDown, Keys.K);

            //UnitAction
            inputManager.AddInput(InputAction.UnitBuild, Buttons.RightTrigger);
            inputManager.AddInput(InputAction.UnitBuild, Keys.U);
            inputManager.AddInput(InputAction.UnitLeft, Buttons.RightThumbstickLeft);
            inputManager.AddInput(InputAction.UnitRight, Buttons.RightThumbstickRight);
            inputManager.AddInput(InputAction.UnitUp, Buttons.RightThumbstickUp);
            inputManager.AddInput(InputAction.UnitDown, Buttons.RightThumbstickDown);
            inputManager.AddInput(InputAction.UnitLeft, Keys.A);
            inputManager.AddInput(InputAction.UnitRight, Keys.D);
            inputManager.AddInput(InputAction.UnitUp, Keys.W);
            inputManager.AddInput(InputAction.UnitDown, Keys.S);

            //GameLobby
            inputManager.AddInput(InputAction.StartGame, Buttons.X);
            inputManager.AddInput(InputAction.BackToMainMenu, Buttons.Y);
            inputManager.AddInput(InputAction.JoinGame, Buttons.A);
            inputManager.AddInput(InputAction.TeamUp, Buttons.LeftThumbstickUp);
            inputManager.AddInput(InputAction.TeamDown, Buttons.LeftThumbstickDown);
            inputManager.AddInput(InputAction.TeamUp, Buttons.DPadUp);
            inputManager.AddInput(InputAction.TeamUp, Buttons.DPadDown);
            inputManager.AddInput(InputAction.StartGame, Keys.X);
            inputManager.AddInput(InputAction.BackToMainMenu, Keys.Y);
            inputManager.AddInput(InputAction.JoinGame, Keys.A);
            inputManager.AddInput(InputAction.TeamUp, Keys.Up);
            inputManager.AddInput(InputAction.TeamDown, Keys.Down);

            inputManager.AddInput(InputAction.HUD, Buttons.LeftStick);
            inputManager.AddInput(InputAction.HUD, Keys.H);

            inputManager.AddInput(InputAction.PickEnemyTarget, Buttons.LeftShoulder);
            inputManager.AddInput(InputAction.PickEnemyTarget, Keys.Q);

            inputManager.AddInput(InputAction.TowerInformation, Buttons.RightShoulder);
            inputManager.AddInput(InputAction.TowerInformation, Keys.P);

            inputManager.AddInput(InputAction.Pause, Buttons.Start);
            inputManager.AddInput(InputAction.Pause, Keys.Z);

            inputManager.AddInput(InputAction.PowerActivate, Buttons.LeftTrigger);
            inputManager.AddInput(InputAction.PowerActivate, Keys.A);

            //Setup Screen Manager
            screenManager = new ScreenManager(this);
            this.Services.AddService(typeof(ScreenManager), screenManager);

            //Setup Camera
            cameraManager = new CameraManager();
            this.Services.AddService(typeof(CameraManager), cameraManager);

            //Set Starting Screen
            screenManager.ShowScreen(new IntroScreen());
        }
Пример #3
0
 public override void LoadContent()
 {
     win_screen = ScreenManager.Game.Content.Load<Texture2D>("OverlayScreens\\mWinner_Team" + mapTeamNumToLetter[teamNum]);
     screenManager = (ScreenManager)ScreenManager.Game.Services.GetService(typeof(ScreenManager));
 }
Пример #4
0
        public void SharedSetup(int playerNum, int teamNum, PlayerType type)
        {
            this.PlayerNum = playerNum;
            this.TeamNum = teamNum;
            this.Type = type;

            IsActive = true;
            IsDead = false;

            this.cameraManager = (CameraManager)ScreenManager.Game.Services.GetService(typeof(CameraManager));

            //FIX THIS
            //HealthString = Health.ToString();
            //MoneyString = Money.ToString();

            SetupStatic();
            //SetupNonStatic();

            currentlySelectedPlayerStatus = PlayerMenuTabs.Status;
            if (Type == PlayerType.Human)
                playerMenuBg = ScreenManager.Game.Content.Load<Texture2D>("PlayerMenu\\player0" + playerNum);
            else
                playerMenuBg = ScreenManager.Game.Content.Load<Texture2D>("PlayerMenu\\player0" + playerNum + "computer");

            screenManager = (ScreenManager)ScreenManager.Game.Services.GetService(typeof(ScreenManager));
        }
Пример #5
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            //Setup some basic input
            inputManager = new InputManager();
            inputManager.AddInput(InputAction.Selection, Keys.Enter);
            inputManager.AddInput(InputAction.Rotation, Keys.Space);
            inputManager.AddInput(InputAction.RotateUp, Keys.Up);
            inputManager.AddInput(InputAction.RotateUp, Keys.I);
            inputManager.AddInput(InputAction.RotateDown, Keys.Down);
            inputManager.AddInput(InputAction.RotateLeft, Keys.Left);
            inputManager.AddInput(InputAction.RotateRight, Keys.Right);
            inputManager.AddInput(InputAction.StrafeUp, Keys.W);
            inputManager.AddInput(InputAction.StrafeDown, Keys.S);
            inputManager.AddInput(InputAction.StrafeLeft, Keys.A);
            inputManager.AddInput(InputAction.StrafeRight, Keys.D);

            //Menu Actions
            inputManager.AddInput(InputAction.MenuUp, Keys.Up);
            inputManager.AddInput(InputAction.MenuDown, Keys.Down);
            inputManager.AddInput(InputAction.MenuSelect, Keys.Enter);
            inputManager.AddInput(InputAction.MenuCancel, Keys.Back);
            this.Services.AddService(typeof(InputManager), inputManager);

            //Movement Actions
            inputManager.AddInput(InputAction.TileMoveUp, Keys.T);
            inputManager.AddInput(InputAction.TileMoveDown, Keys.G);
            inputManager.AddInput(InputAction.TileMoveLeft, Keys.F);
            inputManager.AddInput(InputAction.TileMoveRight, Keys.H);

            //Tower Action
            inputManager.AddInput(InputAction.TowerBuild, Keys.Space);

            //Setup Screen Manager
            screenManager = new ScreenManager(this);

            //Setup Camera
            cameraManager = new CameraManager();
            this.Services.AddService(typeof(CameraManager), cameraManager);

            //Set Starting Screen
            screenManager.ShowScreen(new MenuScreenTest());
        }
        public static void Initialize()
        {
            Players = new Player[5];
            Players[0] = new Player();
            Players[1] = new Player();
            Players[2] = new Player();
            Players[3] = new Player();
            Players[4] = new Player();

            activePlayer = new bool[5];
            activePlayer[0] = false;
            activePlayer[1] = false;
            activePlayer[2] = false;
            activePlayer[3] = false;
            activePlayer[4] = false;

            teamsActive = new bool[5];
            for (int i = 0; i < 5; i++)
            {
                teamsActive[i] = false;
            }

            screenManager = (ScreenManager)ScreenManager.Game.Services.GetService(typeof(ScreenManager));
        }