public Peach(ContentManager content, GraphicsDevice graphicsDevice) { Content = content; graphics = graphicsDevice; StandardSpriteSheet = content.Load <Texture2D>("Peach/StandardPeachSpriteSheet"); FireSpriteSheet = content.Load <Texture2D>("Peach/FirePeachSpriteSheet"); SuperSpriteSheet = content.Load <Texture2D>("Peach/SuperPeachSpriteSheet"); StarSpriteSheet = content.Load <Texture2D>("Peach/StarPeachSpriteSheet"); fireBallPink = content.Load <Texture2D>("FireBallPink"); fireBallStar = content.Load <Texture2D>("FireBallStar"); fireBall = content.Load <Texture2D>("FireBall"); KillGoomba = content.Load <SoundEffect>("Sound Effects/Stomp"); Sprite = new AvatarSprite(graphicsDevice); Sprite.InitializeSprite(StandardSpriteSheet, graphicsDevice, 6, 6); Sprite.SwitchAnimation(Constants.ZERO, 6); PowerUpState = new StandardState(new StandardState(null)); Checkable = true; ActionState = new IdleState(this); Sprite.Acceleration = new Vector2(Constants.ZERO, G); OnGround = true; frameCountA.frames = 100; // invincibility ~ 1.5 s @ 60 fps frameCountA.currentFrame = Constants.ZERO; frameCountA.enabled = false; Invincible = false; }
private ISprite MakeAvatarSprite(ContentManager content, GraphicsDevice graphics) { ISprite sprite; Texture2D avatar = content.Load <Texture2D>("Peach/StandardPeachSpriteSheet"); sprite = new AvatarSprite(graphics); sprite.InitializeSprite(avatar, graphics, 6, 6); sprite.SwitchAnimation(Constants.ZERO, 6); sprite.ScaleSprite(0.39f); sprite.CurrentLocation = new Vector2(TopLeft.X + 140, -5); return(sprite); }