コード例 #1
0
 /// <summary>
 /// Event handler for our Select Level button.
 /// </summary>
 private void SelectLevelPressed(object sender, PlayerIndexEventArgs e)
 {
     // We use the loading screen to move to our level selection screen because the
     // level selection screen needs to load in a decent amount of level art. The Load
     // method will cause all current screens to exit, so to enable us to be able to
     // easily come back from the level select screen, we must also pass down the
     // background and main menu screens.
     LoadingScreen.Load(
         ScreenManager,
         true,
         e.PlayerIndex,
         new BackgroundScreen(), new MainMenuScreen(), new LevelSelectScreen());
 }
コード例 #2
0
ファイル: MenuScreen.cs プロジェクト: rise-worlds/RiseWorlds
 /// <summary>
 /// Helper overload makes it easy to use OnCancel as a MenuEntry event handler.
 /// </summary>
 protected void OnCancel(object sender, PlayerIndexEventArgs e)
 {
     OnCancel(e.PlayerIndex);
 }
コード例 #3
0
 /// <summary>
 /// Event handler for our High Scores button.
 /// </summary>
 private void HighScoresPressed(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new HighScoreScreen(), e.PlayerIndex);
 }