Beispiel #1
0
        public void LoadContent(ContentManager content, Sprite paddleSprite, Sprite fireSpriteStartLeft, Sprite fireSpriteSteadyLeft, Sprite fireSpriteStartRight, Sprite fireSpriteSteadyRight)
        {
            //Texture = content.Load<Texture2D>(paddleString);
            //FireTexture = content.Load<Texture2D>(fireString);
            Sprite = paddleSprite;
            FireSpriteStartLeft        = fireSpriteStartLeft;
            FireSpriteStartLeft.Depth  = 0.4f;
            FireSpriteSteadyLeft       = fireSpriteSteadyLeft;
            FireSpriteSteadyLeft.Depth = 0.4f;

            FireSpriteStartRight        = fireSpriteStartRight;
            FireSpriteStartRight.Depth  = 0.4f;
            FireSpriteSteadyRight       = fireSpriteSteadyRight;
            FireSpriteSteadyRight.Depth = 0.4f;
            FireAnimationData           = new SpriteAnimationData(FireSpriteStartLeft.Frames, FIRE_MILLISECONDS_PER_FRAME);
        }
Beispiel #2
0
        public void LoadContent(ContentManager content, Sprite brickSprite, Sprite crackedSprite, Sprite powerup)
        {
            //Texture = content.Load<Texture2D>(brickString);
            //CrackedTexture = content.Load<Texture2D>(crackedString);

            Sprite        = brickSprite;
            CrackedSprite = crackedSprite;
            //CrackedSprite.AnimationSpeed = 0f;
            CrackedSprite.Depth = 0.4f;

            if (Powerup != null)
            {
                Powerup.LoadContent(content, powerup);
            }
            animationData = new SpriteAnimationData(Sprite.Frames, 0);
        }
Beispiel #3
0
 public new void LoadContent(ContentManager content, Sprite powerUpSprite)
 {
     Sprite        = powerUpSprite;
     animationData = new SpriteAnimationData(Sprite.Frames, getFrameMillis());
 }