예제 #1
0
    void ProcessPlatformCheck()
    {
        C2L.PlatformCheck _PlatformCheck = new C2L.PlatformCheck();
        _PlatformCheck.login_platform = SHSavedData.LoginPlatform;

        switch (SHSavedData.LoginPlatform)
        {
        case LoginPlatform.Facebook:
            _PlatformCheck.login_id = Facebook.Unity.AccessToken.CurrentAccessToken.UserId;
            break;

        case LoginPlatform.GameCenter:
        case LoginPlatform.GooglePlay:
            _PlatformCheck.login_id = UM_GameServiceManager.Instance.Player.PlayerId;
            break;

        case LoginPlatform.Guest:
            ProcessGuestLogin();
            return;

        case LoginPlatform.Betakey:
            ProcessBetakeyLogin();
            return;
        }
        game_server.JsonAsync <C2L.PlatformCheck, C2L.PlatformCheckAck>(_PlatformCheck, OnPlatformCheck);
    }
예제 #2
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);
 }