Esempio n. 1
0
 void ProcessGuestLogin()
 {
     ConnectState = eConnectState.idle;
     C2L.GuestLogin _GuestLogin = new C2L.GuestLogin();
     _GuestLogin.bundle_identifier = GetAppInfo().bundle_identifier;
     game_server.JsonAsync <C2L.GuestLogin, C2L.GuestLoginAck>(_GuestLogin, OnGuestLogin);
 }
Esempio n. 2
0
    void OnGuestLogin(C2L.GuestLogin packet, C2L.GuestLoginAck ack)
    {
        if (ack.result == C2L.eLoginResult.Successed)
        {
            SHSavedData.AccountIdx    = ack.account_idx;
            SHSavedData.LoginToken    = ack.login_token;
            SHSavedData.LoginPlatform = LoginPlatform.Guest;

            game_server.InitAccountIdx(SHSavedData.AccountIdx);

            ProcessLoginAuto();
        }
        else
        {
            ConnectState = eConnectState.idle;
            Popup.Instance.ShowMessageKey("LoginResult_" + ack.result);
        }
    }