Example #1
0
        public Snake()
            : base()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            //Global Configuration
            Theme globalTheme = ThemesCatalog.Catalog[new Random().Next(ThemesCatalog.ThemesCount())];
            Window.IsBorderless = true;
            IsMouseVisible = true;

            graphics.PreferredBackBufferWidth = 1200;
            graphics.PreferredBackBufferHeight = 600;
            graphics.ApplyChanges();

            //Input Handler
            Components.Add(new InputController(this));
            //Screen Handler
            screenController = new GameScreenController(this);
            Components.Add(screenController);

            //Screens
            titleScreen = new TitleState(this, screenController);
            titleScreen.SetTheme(globalTheme);

            screenController.ChangeScreen(titleScreen);
        }
Example #2
0
        public GameScreen(Game game, GameScreenController controller)
            : base(game)
        {
            screenController = controller;
            childComponents = new List<GameComponent>();

            BackgroundColor = Color.White;
            BackgroundImage = null;
        }
Example #3
0
 public GameStateBase(Game game, GameScreenController manager)
     : base(game, manager)
 {
     gameReference = (Snake)game;
 }
Example #4
0
 public TitleState(Game game, GameScreenController manager)
     : base(game, manager)
 {
 }