Ejemplo n.º 1
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            LoadPlayerSprites();
            LoadBallSprites();

            CreatePlayerAnimations();
            CreateBallAnimations();

            GameStadium Stadium = new GameStadium(spriteBatch, Texture2D.FromFile(GraphicsDevice, @"Graphics\Stadium\Template2.png"), Texture2D.FromFile(GraphicsDevice, @"Graphics\Stadium\Grass6.png"));

            Player        = new GamePlayer();
            Player.Sprite = new AnimatedSprite(Player, spriteBatch, playerTextures[0, 0], ClonePlayerAnimations());

            GameBall Ball = new GameBall();

            Ball.Sprite    = new AnimatedSprite(Ball, spriteBatch, ballTextures[0, 0], CloneBallAnimations());
            Ball.BallPoint = new Point(450, 235);

            Match = new GameMatch(spriteBatch, Content.Load <SpriteFont>("Fonts/Small"), new GameTeam(), new GameTeam(), Stadium, Ball, 5);
            Match.StartMatch();
        }