Exemplo n.º 1
0
        public GameScreen(Game game, SpriteBatch spriteBatch)
            : base(game, spriteBatch)
        {
            GameProperties.Instance.Score = 0;

            GameProperties.Instance.GameOver = false;
            this._spriteManager = new SpriteManager.SpriteManager(game);
            this._keyboard      = new Controllers.SoarKeyboard(game);

            SpriteManager.Bird bird = new SpriteManager.Bird(game, spriteBatch);
            GameProperties.Instance.setBird(bird);

            this._spriteManager.AddSprite(new SpriteManager.Background(game, spriteBatch));
            this._spriteManager.AddSprite(new SpriteManager.BlackBird(game, spriteBatch));
            this._spriteManager.AddSprite(new SpriteManager.BlackBird(game, spriteBatch));
            this._spriteManager.AddSprite(new SpriteManager.BlackBird(game, spriteBatch));
            this._spriteManager.AddSprite(new SpriteManager.Pond(game, spriteBatch));
            this._spriteManager.AddSprite(bird);

            game.Components.Add(_spriteManager);
            game.Components.Add(_keyboard);
        }
Exemplo n.º 2
0
        public GameScreen(Game game, SpriteBatch spriteBatch)
            : base(game, spriteBatch)
        {
            GameProperties.Instance.Score = 0;

            GameProperties.Instance.GameOver = false;
            this._spriteManager = new SpriteManager.SpriteManager(game);
            this._keyboard = new Controllers.SoarKeyboard(game);

            SpriteManager.Bird bird = new SpriteManager.Bird(game, spriteBatch);
            GameProperties.Instance.setBird(bird);

            this._spriteManager.AddSprite(new SpriteManager.Background(game, spriteBatch));
            this._spriteManager.AddSprite(new SpriteManager.BlackBird(game, spriteBatch));
            this._spriteManager.AddSprite(new SpriteManager.BlackBird(game, spriteBatch));
            this._spriteManager.AddSprite(new SpriteManager.BlackBird(game, spriteBatch));
            this._spriteManager.AddSprite(new SpriteManager.Pond(game, spriteBatch));
            this._spriteManager.AddSprite(bird);

            game.Components.Add(_spriteManager);
            game.Components.Add(_keyboard);
        }