コード例 #1
0
        private void UpdateControls()
        {
            if (ControlManager.CheckKeyPress(Keys.Enter))
            {
                int startTime = 0;

                Game.stateManager.shooterState.SetupTestLevelRun(chosenLevelTesterEntry.GetLevelEntry(), startTime);
                StatsManager.SetCustomDamageFactor_DEVELOPONLY(lifeFactor);
                Game.stateManager.shooterState.BeginTestLevel();
            }

            if (ControlManager.CheckKeyPress(Keys.Escape))
            {
                Game.stateManager.ChangeState("MainMenuState");
            }

            if (ControlManager.CheckKeyPress(Keys.D1))
            {
                Game.stateManager.stationState.LoadStationData(Game.stateManager.overworldState.GetStation("Highfence Shop"));
                Game.stateManager.ChangeState("StationState");
            }

            if (ControlManager.CheckKeyPress(Keys.D2) && currentLevel >= checkpoint1)
            {
                Game.stateManager.stationState.LoadStationData(Game.stateManager.overworldState.GetStation("Fortrun Shop"));
                Game.stateManager.ChangeState("StationState");
            }

            if (ControlManager.CheckKeyPress(Keys.D3) && currentLevel >= checkpoint2)
            {
                Game.stateManager.stationState.LoadStationData(Game.stateManager.overworldState.GetStation("Rebel Base Shop"));
                Game.stateManager.ChangeState("StationState");
            }

            if (ControlManager.CheckKeyPress(Keys.D4) && currentLevel >= checkpoint3)
            {
                Game.stateManager.stationState.LoadStationData(Game.stateManager.overworldState.GetStation("Peye Shop"));
                Game.stateManager.ChangeState("StationState");
            }

            if (ControlManager.CheckKeyPress(Keys.Space))
            {
                standardEquipEnabled = true;
            }

            if (ControlManager.CheckKeyPress(Keys.M))
            {
                crebits += 1000;
            }

            if (ControlManager.CheckKeyPress(Keys.N))
            {
                currentLevel += 1;
            }
        }
コード例 #2
0
        private void UpdateControls()
        {
            if (ControlManager.CheckKeyPress(Keys.Enter))
            {
                int startTime = 0;

                Game.stateManager.shooterState.SetupTestLevelRun(chosenLevel, startTime);
                StatsManager.SetCustomDamageFactor_DEVELOPONLY(lifeFactor);
                Game.stateManager.shooterState.BeginTestLevel();
            }

            if (ControlManager.CheckKeyPress(Keys.Escape))
            {
                Game.stateManager.ChangeState("MainMenuState");
            }

            if (ControlManager.CheckKeyPress(Keys.Up))
            {
                if (lifeFactor < lifeFactorInterval)
                {
                    lifeFactor = lifeFactorInterval;
                }
                else
                {
                    lifeFactor += lifeFactorInterval;
                }
            }

            if (ControlManager.CheckKeyPress(Keys.Down))
            {
                if (lifeFactor > lifeFactorInterval)
                {
                    lifeFactor -= lifeFactorInterval;
                }
                else
                {
                    lifeFactor = 0.01f;
                }
            }
        }