Ejemplo n.º 1
0
        public Game1()
        {
            _graphics       = new GraphicsDeviceManager(this);
            ScreenRectangle = new Rectangle(
                0,
                0,
                ScreenWidth,
                ScreenHeight);
            IsMouseVisible = true;

            Content.RootDirectory = "Content";

            Components.Add(new InputHandler(this));

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

            _ = new TextureManager();

            TitleScreen              = new TitleScreen(this, _gameStateManager);
            StartMenuScreen          = new StartMenuScreen(this, _gameStateManager);
            GamePlayScreen           = new GamePlayScreen(this, _gameStateManager);
            CharacterGeneratorScreen = new CharacterGeneratorScreen(this, _gameStateManager);
            SkillScreen              = new SkillScreen(this, _gameStateManager);
            LoadGameScreen           = new LoadGameScreen(this, _gameStateManager);
            ConversationScreen       = new ConversationScreen(this, _gameStateManager);
            ShopScreen      = new ShopState(this, _gameStateManager);
            InventoryScreen = new InventoryScreen(this, _gameStateManager);

            _gameStateManager.ChangeState(TitleScreen);

            IsFixedTimeStep = false;
            _graphics.SynchronizeWithVerticalRetrace = false;
        }
Ejemplo n.º 2
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);

            graphics.PreferredBackBufferWidth  = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;

            ScreenRectangle = new Rectangle(
                0,
                0,
                screenWidth,
                screenHeight);

            Content.RootDirectory = "Content";

            Components.Add(new InputHandler(this));

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

            TitleScreen              = new TitleScreen(this, stateManager);
            StartMenuScreen          = new StartMenuScreen(this, stateManager);
            GamePlayScreen           = new GamePlayScreen(this, stateManager);
            CharacterGeneratorScreen = new CharacterGeneratorScreen(this, stateManager);
            LoadGameScreen           = new LoadGameScreen(this, stateManager);
            SkillScreen              = new GameScreens.SkillScreen(this, stateManager);

            stateManager.ChangeState(TitleScreen);

            this.IsFixedTimeStep = false;
            graphics.SynchronizeWithVerticalRetrace = false;
        }
Ejemplo n.º 3
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);

            graphics.PreferredBackBufferWidth  = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;

            ScreenRectangle = new Rectangle(
                0,
                0,
                screenWidth,
                screenHeight);

            Content.RootDirectory = "Content";

            Components.Add(new InputHandler(this));

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

            TitleScreen              = new TitleScreen(this, stateManager);
            StartMenuScreen          = new StartMenuScreen(this, stateManager);
            GamePlayScreen           = new GamePlayScreen(this, stateManager);
            AdminScreen              = new AdminScreen(this, stateManager);
            CharacterGeneratorScreen = new CharacterGeneratorScreen(this, stateManager);

            stateManager.ChangeState(TitleScreen);
        }
Ejemplo n.º 4
0
        public Game1()
        {
            _graphics             = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            IsMouseVisible        = true;

            Components.Add(new InputHandler(this));

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

            TitleScreen              = new TitleScreen(this, _gameStateManager);
            StartMenuScreen          = new StartMenuScreen(this, _gameStateManager);
            GamePlayScreen           = new GamePlayScreen(this, _gameStateManager);
            CharacterGeneratorScreen = new CharacterGeneratorScreen(this, _gameStateManager);

            _gameStateManager.ChangeState(TitleScreen);
        }
Ejemplo n.º 5
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);

            graphics.PreferredBackBufferWidth  = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;

            ScreenRectangle = new Rectangle(
                0,
                0,
                screenWidth,
                screenHeight);

            Content.RootDirectory = "Content";

            Components.Add(new InputHandler(this));

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

            TitleScreen              = new TitleScreen(this, stateManager);
            StartMenuScreen          = new StartMenuScreen(this, stateManager);
            GamePlayScreen           = new GamePlayScreen(this, stateManager);
            AdminScreen              = new AdminScreen(this, stateManager);
            CharacterGeneratorScreen = new CharacterGeneratorScreen(this, stateManager);
            EndGameScreen            = new EndGameScreen(this, stateManager);
            PauseScreen              = new PauseScreen(this, stateManager);
            highscoreScreen          = new HighscoreScreen(this, stateManager);
            upgradeScreen            = new UpgradeScreen(this, stateManager);
            saveHistory              = new SaveHistoryScreen(this, stateManager);
            initPrice = new InitialPriceScreen(this, stateManager);

            spaceShip = new SpaceShip();
            board     = new Board();

            stateManager.ChangeState(TitleScreen);
        }
Ejemplo n.º 6
0
        public Game1()
        {
            _graphics       = new GraphicsDeviceManager(this);
            ScreenRectangle = new Rectangle(
                0,
                0,
                ScreenWidth,
                ScreenHeight);

            Content.RootDirectory = "Content";

            Components.Add(new InputHandler(this));

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

            TitleScreen              = new TitleScreen(this, _gameStateManager);
            StartMenuScreen          = new StartMenuScreen(this, _gameStateManager);
            GamePlayScreen           = new GamePlayScreen(this, _gameStateManager);
            CharacterGeneratorScreen = new CharacterGeneratorScreen(this, _gameStateManager);
            SkillScreen              = new SkillScreen(this, _gameStateManager);

            _gameStateManager.ChangeState(TitleScreen);
        }