Beispiel #1
0
        protected override void Initialize()
        {
            base.Initialize ();
            WindowWidth = GraphicsDevice.DisplayMode.Width;
            WindowHeight = GraphicsDevice.DisplayMode.Height;

            graphics.PreferredBackBufferWidth = WindowWidth;
            graphics.PreferredBackBufferHeight = WindowHeight;
            graphics.ApplyChanges();

            Player = new Player ((WindowWidth - 32.0f) / 2.0f, (WindowHeight - 32.0f) / 2.0f, this, squid);
            Enemy = new Enemy (WindowWidth / 4.0f, WindowHeight / 4.0f, 4, EnemyTexture, this);
        }
Beispiel #2
0
 public GameScene(Game game)
     : base(game)
 {
     player = new Player(game);
     enemy = new Enemy(game);
 }