public override void Update(GameTime gameTime) { if (IsPickedUp) { return; } Sprite.Update(gameTime); HoveringSprite.Update(gameTime); if (IsPlayerCollision(Sprite.Position.X, Sprite.Position.Y)) { PickedUp(); } HoveringSprite.Position = new Vector2(HoveringSprite.Position.X, (float)(5.0 * Math.Sin(0.005 * gameTime.TotalGameTime.TotalMilliseconds) + SpawningLocation.Y - 20.0)); base.Update(gameTime); }
public override void Update(GameTime gameTime) { Sprite.Update(gameTime); base.Update(gameTime); }