Пример #1
0
        //---------------------------------------------------------------------
        // 保存登录帐号信息
        public void SaveLoginAccountInfo(string acc, string pwd)
        {
            var login_accinfo = new LoginAccountInfo();

            login_accinfo.account_name = acc;
            login_accinfo.pwd          = pwd;

            LoginAccountInfo = login_accinfo;

            //string s = EbTool.jsonSerialize(LoginAccountInfo);
            //PlayerPrefs.SetString(KeyLoginAccountInfo, s);
        }
Пример #2
0
        //---------------------------------------------------------------------
        // 加载登录帐号信息
        public LoginAccountInfo LoadLoginAccountInfo()
        {
            if (PlayerPrefs.HasKey(KeyLoginAccountInfo))
            {
                string s = PlayerPrefs.GetString(KeyLoginAccountInfo);
                LoginAccountInfo = EbTool.jsonDeserialize <LoginAccountInfo>(s);
            }
            else
            {
                LoginAccountInfo = new LoginAccountInfo();
            }

            return(LoginAccountInfo);
        }