public void PickedUp(Player.Player player, PopUp popUp) { if (player.GetCollRectangle().Intersects(Rectangle) && !ToDelete) { ToDelete = true; popUp.IsVisible = true; } }
public void Update(GameTime gameTime, Player.Player player, PopUp popUp) { this._gameTime = gameTime; _animation.Update(gameTime); PickedUp(player, popUp); _glowTimer+= gameTime.ElapsedGameTime.Milliseconds; if (_radius.Intersects(player.GetCollRectangle())) { if (_glowTimer > 4000) { _glow.Play(); _glowTimer = 0; } } }