protected void CheckPowerUpExpiration(GameTime gameTime) { // Is a power-up active? if (powerUpExpiration > 0) { // Decrement power-up timer powerUpExpiration -= gameTime.ElapsedGameTime.Milliseconds; if (powerUpExpiration <= 0) { // If power-up timer has expired, end all power-ups powerUpExpiration = 0; player.ResetScale(); player.ResetSpeed(); } } }