public void OnParamOnline(MenuParamGameOnline menuParam) { string pseudo = "Player"; if (playerType == PlayerType.Human) { pseudo = (menuParam.player as PlayerName).Pseudo; } else { //TODO Get param if AI throw new Exception("AI not supported yet"); // TODO BASTIEN :corriger cette ligne voodoo //string pseudo = (menuParam.player1 as PlayerAI); // Create the player //player1 = new Client(playerType, pseudo); } new Thread(() => { // Register clients to applicationManager ApplicationManager.Instance.JoinGameOnline(playerType, pseudo, battleType); }) .Start(); }
private void OnPlayAgainst(BattleType battleType) { this.battleType = battleType; MenuParamGameOnline paramGame = new MenuParamGameOnline(playerType); paramGame.OnParamGameOnlineEvent += OnParamOnline; pageTransitionControl.ShowPage(paramGame); }