GotoLevel() public method

public GotoLevel ( int levelIndex ) : void
levelIndex int
return void
示例#1
0
文件: Exit.cs 项目: zmthy/play-dead
 // 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);
 }