Exemple #1
0
 void OnPlatformCheck(C2L.PlatformCheck packet, C2L.PlatformCheckAck ack)
 {
     C2L.PlatformLogin _PlatformLogin = new C2L.PlatformLogin();
     _PlatformLogin.login_platform    = packet.login_platform;
     _PlatformLogin.login_id          = packet.login_id;
     _PlatformLogin.bundle_identifier = GetAppInfo().bundle_identifier;
     _PlatformLogin.is_new            = !ack.is_exist;
     SendPlatformLogin(_PlatformLogin);
 }
Exemple #2
0
    void OnPlatformLogin(C2L.PlatformLogin packet, C2L.PlatformLoginAck ack)
    {
        if (ack.result == C2L.eLoginResult.Successed)
        {
            SHSavedData.AccountIdx    = ack.account_idx;
            SHSavedData.LoginToken    = ack.login_token;
            SHSavedData.LoginPlatform = packet.login_platform;

            game_server.InitAccountIdx(SHSavedData.AccountIdx);

            ProcessLoginAuto();
        }
        else
        {
            ConnectState = eConnectState.idle;
            Popup.Instance.ShowMessageKey("LoginResult_" + ack.result);
        }
    }
Exemple #3
0
 void SendPlatformLogin(C2L.PlatformLogin _PlatformLogin)
 {
     game_server.JsonAsync <C2L.PlatformLogin, C2L.PlatformLoginAck>(_PlatformLogin, OnPlatformLogin);
 }