예제 #1
0
파일: Snake.cs 프로젝트: rnegretejy/Zigurat
        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);
        }
예제 #2
0
        public GameScreen(Game game, GameScreenController controller)
            : base(game)
        {
            screenController = controller;
            childComponents = new List<GameComponent>();

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