示例#1
0
        public TunnelVision()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            input = new InputHandler(this);
            Components.Add(input);

            Camera = new TunnelVisionCamera(this);
            Components.Add(Camera);

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

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

            //Components.Add(new GamerServicesComponent(this));

            TitleIntroState  = new TitleIntroState(this);
            StartMenuState   = new StartMenuState(this);
            OptionsMenuState = new OptionsMenuState(this);
            PlayingState     = new PlayingState(this);
            StartLevelState  = new StartLevelState(this);
            FadingState      = new FadingState(this);
            LostGameState    = new LostGameState(this);
            WonGameState     = new WonGameState(this);
            PausedState      = new PausedState(this);
            YesNoDialogState = new YesNoDialogState(this);
            //HighScoresState = new HighScoresState(this);

            gameManager.ChangeState(TitleIntroState.Value);
        }
示例#2
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            input = new InputHandler(this);
            Components.Add(input);

            camera = new Camera(this);
            Components.Add(camera);

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

            TitleIntroState  = new TitleIntroState(this);
            StartMenuState   = new StartMenuState(this);
            OptionsMenuState = new OptionsMenuState(this);
            PlayingState     = new PlayingState(this);
            StartLevelState  = new StartLevelState(this);
            FadingState      = new FadingState(this);
            LostGameState    = new LostGameState(this);
            WonGameState     = new WonGameState(this);
            PausedState      = new PausedState(this);
            YesNoDialogState = new YesNoDialogState(this);

            gameManager.ChangeState(TitleIntroState.Value);
        }
示例#3
0
        //Into Screen

        #endregion

        public Game1()
            : base()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            //Game Services
            input               = new InputHandler(this);
            console             = new GameConsole(this);
            celAnimationManager = new CelAnimationManager(this);
            this.Components.Add(input);
            this.Components.Add(console);
            this.Components.Add(celAnimationManager);



            #region GameStates
            gameManager     = new GameStateManager(this);
            TitleIntroState = new TitleIntroState(this);
            StartMenuState  = new StartMenuState(this);
            PlayingState    = new PlayingState(this);
            PausedState     = new PausedState(this);

            gameManager.ChangeState(TitleIntroState.Value);
            #endregion
        }
示例#4
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);

            graphics.PreferredBackBufferWidth = 1366;
            graphics.PreferredBackBufferHeight = 768;

            Content.RootDirectory = "Content";

            sb = new SpriteBatch(GraphicsDevice);

            input = new InputHandler(this);

            this.Components.Add(input);

            celAnimationManager = new CelAnimationManager(this);
            this.Components.Add(celAnimationManager);

            GameManager = new GameStateManager(this);

            PlayingState = new PlayingState(this);
            PausedState = new PausedState(this);
            TitleState = new TitleIntroState(this);
            StartMenuState = new StartMenuState(this);
            EndState = new EndState(this);

            GameManager.ChangeState(TitleState.Value);
            //GameManager.ChangeState(PlayingState.Value);
        }
示例#5
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);


            Content.RootDirectory = "Content";
            IsMouseVisible        = true;

            //full screen.
            graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
            graphics.PreferredBackBufferWidth  = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;

            //windowed screen.

            //graphics.PreferredBackBufferHeight = 1000;
            //graphics.PreferredBackBufferWidth = 1600;

            screen_height = graphics.PreferredBackBufferHeight;
            screen_width  = graphics.PreferredBackBufferWidth;

            FontScale = Game1.screen_height * 0.00055f; // for scaling our fonts to different screens.

            inputHandler = new InputHandler(this);
            Components.Add(inputHandler);

            celAnimationManager = new CelAnimationManager(this, "Textures\\Animations");
            Components.Add(celAnimationManager);

            soundManager = new SoundManager(this);
            Components.Add(soundManager);

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



            TitleIntroState      = new TitleIntroState(this);
            StartMenuState       = new StartMenuState(this);
            ChooseFlagState      = new ChooseFlagState(this);
            PausedState          = new PausedState(this);
            OptionsMenuState     = new OptionsMenuState(this);
            BuildingBoardState   = new BuildingBoardState(this);
            PlacingSoldiersState = new PlacingSoldiersState(this);
            PlayingState         = new PlayingState(this);

            EnableSoundFx = true;
            EnableMusic   = true;
        }
示例#6
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);

            Content.RootDirectory = "Content";
            this.IsMouseVisible   = true;

            graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
            graphics.PreferredBackBufferWidth  = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;

            screen_height = graphics.PreferredBackBufferHeight;
            screen_width  = graphics.PreferredBackBufferWidth;

            inputHandler = new InputHandler(this);
            Components.Add(inputHandler);

            celAnimationManager = new CelAnimationManager(this, "Textures\\Animations");
            Components.Add(celAnimationManager);

            soundManager = new SoundManager(this);
            Components.Add(soundManager);

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

            TitleIntroState = new TitleIntroState(this);
            StartMenuState  = new StartMenuState(this);

            PausedState          = new PausedState(this);
            OptionsMenuState     = new OptionsMenuState(this);
            BuildingBoardState   = new BuildingBoardState(this);
            PlacingSoldiersState = new PlacingSoldiersState(this);
            PlayingState         = new PlayingState(this);

            EnableSoundFx = true;
            EnableMusic   = true;
        }
        public SettlersOfCatan()
        {
            gameType = "BaseGame";

            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            graphics.IsFullScreen = fullscreen;
            graphics.PreferredBackBufferHeight = height;
            graphics.PreferredBackBufferWidth = width;

            input = new InputHandler(this);
            Components.Add(input);

            camera = new Camera(this);
            Components.Add(camera);
            camera.UpdateInput = false;

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

            //Components.Add(new GamerServicesComponent(this));

            //TitleIntroState = new TitleIntroState(this);
            StartMenuState = new StartMenuState(this);
            PlayingState = new PlayingState(this);
            FinishedState = new FinishedState(this);

            gameManager.ChangeState(StartMenuState.Value);

            #if DEBUG
            fps = new FrameRate(this);
            #else
            fps = new FrameRate(this, true, false);
            #endif
            Components.Add(fps);
        }
示例#8
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            graphics.PreferredBackBufferWidth = 1024;
            graphics.PreferredBackBufferHeight = 768;
            Window.Title = "Infinity TD";

            input = new InputHandler(this);
            Components.Add(input);

            IsMouseVisible = false;

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

            TitleIntroState = new TitleIntroState(this);
            StartMenuState = new StartMenuState(this);
            OptionsMenuState = new OptionsMenuState(this);
            PlayingState = new PlayingState(this);
            PausedState = new PausedState(this);
            soundManager = new SoundManager(this);
            gameManager.ChangeState(TitleIntroState.Value);
        }