Example #1
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);
            startMenuState      = new MainMenuState(this);
            startSettingsState  = new SettingsState(this);
            startChooseMapState = new ChooseMapState(this);
            startPlayState      = new PlayState(this);

            gameStateManager.ChangeState((TitleIntroState)titleIntroState);
        }
Example #2
0
        public ASummonersTaleGame()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            #region Set up settings
            Settings = new Settings();

            if (!(Task.Run(async() => await Settings.ReadSettings()).Result))
            {
                Exit();

                return;
            }

            if (Settings.AntiAliasingOn)
            {
                EnableAntiAliasing();
            }
            #endregion

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

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

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

            this.IsMouseVisible = true;

            #region Create game states
            splashScreenState = new SplashScreenState(this);
            startMenuState    = new MenuState(this);
            playState         = new PlayState(this);
            worldMapState     = new WorldMapState(this);
            #endregion

            stateManager.ChangeState((SplashScreenState)splashScreenState, PlayerIndex.One);
        }
Example #3
0
 public void Awake()
 {
     _state = new Run(_velocity, transform);
 }