コード例 #1
0
    public void guest_login()
    {
        this.g_key        = PlayerPrefs.GetString("login_guest_key");
        this.is_save_gkey = false;
        if (this.g_key == null || this.g_key.Length != 32)
        {
            this.g_key        = utils.rand_str(32);
            this.is_save_gkey = true;
        }

        GuestLoginReq req = new GuestLoginReq();

        req.guestkey = this.g_key;
        network.Instance.send_protobuf_cmd((int)Stype.Auth, (int)Cmd.eGuestLoginReq, req);
    }
コード例 #2
0
    public void guest_login()
    {
        //PlayerPrefs.DeleteAll();
        this.g_key = PlayerPrefs.GetString("moba_guest_key");
        // this.g_key = null;
        if (this.g_key == null || this.g_key.Length <= 0)
        {
            this.g_key = utils.rand_str(32);
            PlayerPrefs.SetString("moba_guest_key", this.g_key);
        }

        GuestLoginReq req = new GuestLoginReq();

        req.guest_key = this.g_key;

        network.Instance.send_protobuf_cmd(Stype.Auth, Cmd.eGuestLoginReq, req);
    }
コード例 #3
0
    public void GuestLogin()
    {
        this.g_key = PlayerPrefs.GetString("xcy_moba_guest_key");
        //this.g_key = null;
        this._isSaveGKey = false;
        if (this.g_key == null || this.g_key.Length != 32)
        {
            this.g_key = utils.RandStr(32);
            //this.g_key = "to9OveCec00GdBnaTp0mFRashRUsnQJu";
            this._isSaveGKey = true;
            Debug.Log("random key:" + this.g_key);
        }

//        this.g_key = "Hello";
        GuestLoginReq req = new GuestLoginReq();

        req.guest_key = this.g_key;
        network.Instance.SendProtobufCmd((int)Stype.Auth, (int)Cmd
                                         .eGuestLoginReq, req);
    }
コード例 #4
0
    public void guest_login()
    {
        this.g_key   = PlayerPrefs.GetString("bycw_moba_guest_key");
        is_save_gkey = false;
        if (this.g_key == null || this.g_key.Length != 32)
        {
            this.g_key = utils.reand_str(32);
            //this.g_key = "FFNBq2d152SexhdspIWf38IURrKNSqwh";
            is_save_gkey = true;
            Debug.Log("randm key = " + this.g_key);
        }
        else
        {
            Debug.Log("load in local storage " + this.g_key);
        }
        //this.g_key = "Hello";

        GuestLoginReq req = new GuestLoginReq();

        req.guest_key = g_key;

        network.Instance.send_protobuf_cmd((int)Stype.Auth, (int)Cmd.eGuestLoginReq, req);
    }
コード例 #5
0
ファイル: AuthServiceProxy.cs プロジェクト: mosheepdev/Moba-1
        /// <summary>
        /// 游客登陆
        /// </summary>
        public void GuestLogin()
        {
            Debug.Log("尝试游客登陆");

            var key = PlayerPrefs.GetString(PrefKey.GuestKey);

            if (string.IsNullOrEmpty(key))
            {
                key = RandomUtil.RandomStr(15);
                PlayerPrefs.SetString(PrefKey.GuestKey, key);
            }

            Debug.Log(key);

            var req = new GuestLoginReq
            {
                guest_key = key,
            };

            NetworkMgr.Instance.SendProtobufCmd(
                (int)ServiceType.Auth,
                (int)LoginCmd.eGuestLoginReq,
                req);
        }