コード例 #1
0
ファイル: Game1.cs プロジェクト: travislynn/AdventureGame
        public Game1()
        {
            var graphics = new GraphicsDeviceManager(this);

            Content.RootDirectory = "Content";

            ScreenRectangle = new Rectangle(0, 0, 1280, 720);

            graphics.PreferredBackBufferWidth  = ScreenRectangle.Width;
            graphics.PreferredBackBufferHeight = ScreenRectangle.Height;

            var gameStateManager = new GameStateManager(this);

            Components.Add(gameStateManager);

            this.IsMouseVisible = true;

            TitleIntroState   = new TitleIntroState(this);
            StartMenuState    = new MainMenuState(this);
            GamePlayState     = new GamePlayState(this);
            ConversationState = new ConversationState(this);
            BattleState       = new BattleState(this);
            BattleOverState   = new BattleOverState(this);
            DamageState       = new DamageState(this);
            LevelUpState      = new LevelUpState(this);

            // begin game at TitleIntroState
            gameStateManager.ChangeState((TitleIntroState)TitleIntroState, PlayerIndex.One);

            CharacterManager = CharacterManager.Instance;
        }
コード例 #2
0
        public Game1()
        {
            _graphics             = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            ScreenRectangle = new Rectangle(0, 0, 1280, 720);
            _graphics.PreferredBackBufferHeight = ScreenRectangle.Height;
            _graphics.PreferredBackBufferWidth  = ScreenRectangle.Width;

            GameStateManager = new GameStateManager(this);
            Components.Add(GameStateManager);

            IntroState     = new TitleIntroState(this);
            StartMenuState = new MainMenuState(this);
            GamePlayState  = new GamePlayState(this);

            GameStateManager.ChangeState(IntroState, PlayerIndex.One);
        }
コード例 #3
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            screenRectangle = new Rectangle(0, 0, 1280, 720);

            graphics.PreferredBackBufferWidth  = ScreenRectangle.Width;
            graphics.PreferredBackBufferHeight = ScreenRectangle.Height;

            gameStateManager = new GameStateManager(this);
            Components.Add(gameStateManager);

            this.IsMouseVisible = true;

            titleIntroState = new TitleIntroState(this);
            mainMenuState   = new MainMenuState(this);
            gamePlayState   = new GamePlayState(this);
            gameOverState   = new GameOverState(this);

            gameStateManager.ChangeState((TitleIntroState)titleIntroState, PlayerIndex.One);
        }