Example #1
0
        private void LogReaderOnGameStateChange(HsLogReader sender, GameStateArgs args)
        {
            switch (args.State)
            {
            case GameState.GameBegin:
                HandleGameStart();
                break;

            case GameState.GameEnd:
                HandleGameEnd();
                break;
            }
        }
 private void LogReaderOnGameStateChange(HsLogReader sender, GameStateArgs args)
 {
     switch (args.State)
     {
         case GameState.GameBegin:
             HandleGameStart();
             break;
         case GameState.GameEnd:
             HandleGameEnd();
             break;
     }
 }
		private void LogReaderOnGameStateChange(HsLogReader sender, GameStateArgs args)
		{
			if (!string.IsNullOrEmpty(args.PlayerHero))
			{
				_game.PlayingAs = args.PlayerHero;
				Logger.WriteLine("Playing as " + args.PlayerHero, "Hearthstone");

			}
			if (!string.IsNullOrEmpty(args.OpponentHero))
			{
				_game.PlayingAgainst = args.OpponentHero;
				Logger.WriteLine("Playing against " + args.OpponentHero, "Hearthstone");
			}

			if (args.State != null)
			{
				switch (args.State)
				{
					case GameState.GameBegin:
						HandleGameStart();
						break;
					case GameState.GameEnd:
						HandleGameEnd();
						break;
				}
			}
		}