private void RecvResult <R>(BaseModel ret, R result) { string name = ret.GetType().Name; if (ret.Error == Error.None) { Debug.Log((object)(name + " result:" + result)); switch (name) { case "CheckRegisterModel": { CheckRegisterModel checkRegisterModel = (CheckRegisterModel)ret; SetUser(checkRegisterModel.result.userInfo); SetAccount(checkRegisterModel.result.uh); break; } case "AssetBundleVersionModel": { AssetBundleVersionModel assetBundleVersionModel = (AssetBundleVersionModel)ret; SetUser(assetBundleVersionModel.result.userInfo); break; } case "RegistCreateModel": { RegistCreateModel registCreateModel = (RegistCreateModel)ret; SetUser(registCreateModel.result.userInfo); SetAccount(registCreateModel.result.uh); break; } case "StatusInfoModel": { OnceStatusInfoModel onceStatusInfoModel = (OnceStatusInfoModel)ret; SetUser(onceStatusInfoModel.result.user); break; } } } else { Debug.LogError((object)(name + " error:" + ret.Error)); MonoBehaviourSingleton <AccountManager> .I.ClearAccount(); } if (MonoBehaviourSingleton <UserInfoManager> .I.userInfo != null) { m_progress = PROGRESS.REGIST_OK; } else { m_progress++; } Debug.Log((object)("progress:" + m_progress)); m_isSending = false; }
private void CheckCrystalNum(OnceStatusInfoModel ret, Action onFinish) { if (ret.Error == Error.None) { MonoBehaviourSingleton <UserInfoManager> .I.userStatus.crystal = ret.result.userStatus.crystal; MonoBehaviourSingleton <UserInfoManager> .I.DirtyUserStatus(); onFinish(); } }