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


C# IHsGameState.GameEnd方法代码示例

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


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

示例1: Handle

        public void Handle(string logLine, IHsGameState gameState, IGame game)
        {
            if (logLine[9] != 'R' && logLine[16] != 'r') // [Bob] ---Register
                return;

            if (logLine.Length == 29 && logLine[23] == 'B' && logLine[25] == 'x') // ---RegisterScreenBox---
            {
                if (game.CurrentGameMode == GameMode.Spectator)
                    gameState.GameEnd();
            }
            else if (logLine.Length == 31 && logLine[23] == 'F' && logLine[27] == 'e') // ---RegisterScreenForge---
            {
                gameState.GameHandler.SetGameMode(GameMode.Arena);
                game.ResetArenaCards();
            }
            else if (logLine.Length == 34)
            {
                if (logLine[23] == 'P' && logLine[30] == 'e') // ---RegisterScreenPractice---
                    gameState.GameHandler.SetGameMode(GameMode.Practice);
                else if (logLine[23] == 'T' && logLine[30] == 's') // ---RegisterScreenTourneys---
                    gameState.GameHandler.SetGameMode(GameMode.Casual);
                else if (logLine[23] == 'F' && logLine[30] == 'y') // ---RegisterScreenFriendly---
                    gameState.GameHandler.SetGameMode(GameMode.Friendly);
                else if (logLine[23] == 'e' && logLine[24] == 'N' && logLine[30] == 's') // RegisterProfileNotices
                    gameState.GameLoaded = true;
            }
            else if (logLine.Length == 35 && logLine[17] == 'F' && logLine[22] == 'd' && logLine[23] == 'C') // RegisterFriendChallenge
            {
                gameState.GameHandler.HandleInMenu();
            }
            else if (logLine.Length == 43 && logLine[23] == 'C' && logLine[32] == 'n' && logLine[33] == 'M' && logLine[39] == 'r')// ---RegisterScreenCollectionManager---
                gameState.GameHandler.ResetConstructedImporting();
        }
开发者ID:radoraykov,项目名称:Hearthstone-Deck-Tracker,代码行数:33,代码来源:BobHandler.cs

示例2: Handle

	    public void Handle(string logLine, IHsGameState gameState, IGame game)
	    {
		    if(!logLine.Contains("---Register"))
			    return;

		    if(logLine.Contains("---RegisterScreenBox---"))
		    {
			    if(game.CurrentGameMode == GameMode.Spectator)
				    gameState.GameEnd();
		    }
		    else if(logLine.Contains("---RegisterScreenForge---"))
		    {
			    gameState.GameHandler.SetGameMode(GameMode.Arena);
			    game.ResetArenaCards();
		    }
		    else if(logLine.Contains("---RegisterScreenPractice---"))
			    gameState.GameHandler.SetGameMode(GameMode.Practice);
		    else if(logLine.Contains("---RegisterScreenTourneys---"))
			    gameState.GameHandler.SetGameMode(GameMode.Casual);
		    else if(logLine.Contains("---RegisterScreenFriendly---"))
			    gameState.GameHandler.SetGameMode(GameMode.Friendly);
		    else if(logLine.Contains("---RegisterProfileNotices---"))
			    gameState.GameLoaded = true;
		    else if(logLine.Contains("---RegisterFriendChallenge---"))
		    {
			    gameState.GameHandler.HandleInMenu();
		    }
		    else if(logLine.Contains("---RegisterScreenCollectionManager---"))
			    gameState.GameHandler.ResetConstructedImporting();
	    }
开发者ID:nikolasferreira,项目名称:Hearthstone-Deck-Tracker,代码行数:30,代码来源:BobHandler.cs


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