// Switch - the player has to be near and respond to a key press public override void ChangeState(Player p, KeyboardState keyState, InputManager inputManager) { RectangleF other = p.BoundingRectangle; Boolean touching = other.Intersects(this.BoundingRectangle); if (inputManager.IsNewPress(Keys.E) && touching) p.GotoLevel(levelIndex); }