Beispiel #1
0
 public GameMatch(SpriteBatch SpriteBatch, SpriteFont font, GameTeam Home, GameTeam Away, GameStadium stadium, GameBall ball, double minutes)
 {
     spriteBatch = SpriteBatch;
     Font        = font;
     HomeTeam    = Home;
     AwayTeam    = Away;
     Stadium     = stadium;
     Ball        = ball;
     Minutes     = minutes;
 }
        public AnimatedSprite(GameBall ball, SpriteBatch Batch, Texture2D texture, List <Animation> animations)
        {
            Ball            = ball;
            spriteBatch     = Batch;
            this.animations = animations;
            width           = animations[(int)Ball.CurrentBall].FrameWidth;
            height          = animations[(int)Ball.CurrentBall].FrameHeight;
            center          = new Vector2(width / 2, height / 2);

            this.texture = texture;
            scale        = 1.0f;
            rotation     = 0.0f;

            sourceRectangle = new Rectangle(0, 0, texture.Width, texture.Height);
        }