Beispiel #1
0
    /**
     * <summary> Réponse à l'authentification. </summary>
     */
    void OnAuthentificationResponse(NetworkMessageInfo info, BloodAndBileEngine.Networking.NetworkMessages.ConditionCheckResponseMessage message)
    {
        if (message.Accepted)
        {
            Debugger.Log("Authentification au Master Server acceptée !");
            ClientConnectionsManager.AddConnection("MasterServer", info.ConnectionID);

            // Mise à jour des informations client.

            Client.Username = Username;

            // Transition vers le "MainMenuState".
            Client.ChangeState(new MainMenuState());
        }
        else
        {
            Debugger.Log("Authentification au Master Server refusée ! Raison : " + message.Reason, UnityEngine.Color.red);
            NetworkSocket.Disconnect(info.ConnectionID); // On se déconnecte du master server.
        }
    }
 void OnAuthentificationResponseReceived(BloodAndBileEngine.Networking.NetworkMessageInfo info, BloodAndBileEngine.Networking.NetworkMessages.ConditionCheckResponseMessage message)
 {
     if (message.Accepted)
     {
         BloodAndBileEngine.Debugger.Log("Authentification au Match Server acceptée !");
         BloodAndBileEngine.Debugger.Log("Attente d'un Match.");
         MatchServerConnected = true;
     }
     else
     {
         BloodAndBileEngine.Debugger.Log("Authentification au Match Server refusée : " + message.Reason, UnityEngine.Color.red);
         BloodAndBileEngine.Debugger.Log("Retour au MatchServerSearchState...", UnityEngine.Color.red);
         Client.ChangeState(new MatchServerSearchState());
     }
 }
Beispiel #3
0
 void OnAuthentificationResponseReceived(BloodAndBileEngine.Networking.NetworkMessageInfo info, BloodAndBileEngine.Networking.NetworkMessages.ConditionCheckResponseMessage msg)
 {
     if (msg.Accepted)
     {
         BloodAndBileEngine.Debugger.Log("Authentification au Master Server acceptée !");
         Connected = true;
     }
     else
     {
         BloodAndBileEngine.Debugger.Log("Authentification au Master Server refusée : " + msg.Reason, UnityEngine.Color.red);
         BloodAndBileEngine.Networking.NetworkSocket.Disconnect(MasterServerConnectionID); // Déconnexion du Master Server.
     }
 }