Exemplo n.º 1
0
        /// <summary>
        /// 游客登录成功事件
        /// </summary>
        /// <param name="obj"></param>
        public void Msglogintourist(object obj)
        {
            m2c_logintourist msg = (m2c_logintourist)obj;

            if (msg.resultCode == "0")
            {
                string setUserName = msg.name;
                string setPsd      = msg.pwd;
                GameEntry.Setting.SetString("VisitorUserName", setUserName);
                GameEntry.Setting.SetString("VisitorPsd", setPsd);
                SendLoginMessage(setUserName, setPsd);
                //Debug.Log(" sdd " + setPsd);
            }
            if (msg.resultCode == "-1")
            {
            }
        }
Exemplo n.º 2
0
        public void MsgAnalysis(JsonData res, Action <object> action)
        {
            m2c_logintourist m2c = new m2c_logintourist();

            m2c.resultCode = res["respVo"]["resultCode"].ToString();
            m2c.resultDesc = res["respVo"]["resultDesc"].ToString();
            if (m2c.resultCode == "0")
            {
                m2c.name = res["user"]["userMap"][0]["name"].ToString();
                m2c.pwd  = res["user"]["userMap"][0]["pwd"].ToString();
            }
            Debug.Log("游客登录");
            if (action != null)
            {
                action(m2c);
            }
        }