当前位置: 首页>>代码示例>>C#>>正文


C# GameManager.ChangeScreen方法代码示例

本文整理汇总了C#中GameManager.ChangeScreen方法的典型用法代码示例。如果您正苦于以下问题:C# GameManager.ChangeScreen方法的具体用法?C# GameManager.ChangeScreen怎么用?C# GameManager.ChangeScreen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GameManager的用法示例。


在下文中一共展示了GameManager.ChangeScreen方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: StartMenuScreen

 public StartMenuScreen(GameManager gameManager)
     : base(gameManager)
 {
     var menuItems = new List<MenuItem>
     {
         new MenuItem(Strings.NEW_GAME, LinkType.Transition, () => gameManager.ChangeScreen("DemoLevelScreen")),
         new MenuItem(Strings.OPTIONS, LinkType.Transition, () => gameManager.ChangeScreen("OptionsMenuScreen")),
         new MenuItem(Strings.HIGH_SCORES, LinkType.Transition, () => gameManager.ChangeScreen("HighScoresScreen")),
     };
     _menu = new Menu(gameManager, menuItems);
 }
开发者ID:nakioman,项目名称:furryrun,代码行数:11,代码来源:StartMenuScreen.cs

示例2: HighScoresScreen

 public HighScoresScreen(GameManager gameManager)
     : base(gameManager)
 {
     _highScores = new ImageFile { Text = Strings.HIGH_SCORES, Scale = new Vector2(2f, 2f) };
     _menu = new Menu(gameManager, new[]
     {                
         new MenuItem(Strings.NEW_GAME, LinkType.Transition, () => gameManager.ChangeScreen("DemoLevelScreen")), 
         new MenuItem(Strings.OPTIONS, LinkType.Transition, () => gameManager.ChangeScreen("OptionsMenuScreen"))
     });
    
     _scoresImageFiles = new List<ImageFile>();
 }
开发者ID:nakioman,项目名称:furryrun,代码行数:12,代码来源:HighScoresScreen.cs

示例3: GameOverScreen

 public GameOverScreen(GameManager gameManager)
     : base(gameManager)
 {
     _menu = new Menu(gameManager, new[]
     {
         new MenuItem(Strings.UPLOAD_SCORE, LinkType.Switch, UploadGameScore), 
         new MenuItem(Strings.HIGH_SCORES, LinkType.Transition, () => gameManager.ChangeScreen("HighScoresScreen")), 
         new MenuItem(Strings.NEW_GAME, LinkType.Transition, () => gameManager.ChangeScreen("DemoLevelScreen")), 
         new MenuItem(Strings.OPTIONS, LinkType.Transition, () => gameManager.ChangeScreen("OptionsMenuScreen")),
     });
     _gameOver = new ImageFile { Text = Strings.GAME_OVER, Scale = new Vector2(2f, 2f) };
     _score = new ImageFile { Text = String.Format("{0}: {1}", Strings.YOUR_SCORE, gameManager.PlayerStats.CurrentScore) };
     _highScore = new ImageFile { Text = String.Format("{0}: {1}", Strings.YOUR_HIGH_SCORE, gameManager.PlayerStats.HighScore) };
 }
开发者ID:nakioman,项目名称:furryrun,代码行数:14,代码来源:GameOverScreen.cs

示例4: OptionsMenuScreen

 public OptionsMenuScreen(GameManager gameManager)
     : base(gameManager)
 {
     _gameManager = gameManager;
     var sound = gameManager.SoundManager.EffectsOn ? Strings.ON : Strings.OFF;
     var music = gameManager.SoundManager.MusicOn ? Strings.ON : Strings.OFF;
     _soundMenuItem = new MenuItem(String.Format("{0}: {1}", Strings.SOUND, sound), LinkType.Switch, SwitchSoundEffects);
     _musicMenuItem = new MenuItem(String.Format("{0}: {1}", Strings.MUSIC, music), LinkType.Switch, SwitchMusic);
     var menuItems = new List<MenuItem>
     {
         _soundMenuItem,
         _musicMenuItem,
         new MenuItem(Strings.BACK, LinkType.Transition, () => gameManager.ChangeScreen("StartMenuScreen")),
     };
     _menu = new Menu(gameManager, menuItems);
 }
开发者ID:nakioman,项目名称:furryrun,代码行数:16,代码来源:OptionsMenuScreen.cs


注:本文中的GameManager.ChangeScreen方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。