public void SetStickTypeToPlayerPrefs(eStickType eType, eGoodsState eGoods) { switch (eGoods) { case eGoodsState.Disable: if (1 >= GetEnableSticksToPlayerPrefs().Count) { Single.UI.ShowNotice("알림", "꼬쟁이는 최소 1개 이상입니다."); return; } break; } var pEnableSticks = GetEnableSticksToPlayerPrefs(); SHPlayerPrefs.SetInt(string.Format("Inventory_Stick_{0}", (int)eType), (int)eGoods); switch (eGoods) { case eGoodsState.Enable: SHUtils.ForToList(pEnableSticks, (eStick) => { SetStickTypeToPlayerPrefs(eStick, eGoodsState.Disable); }); break; } }
public void SetMonsterTypeToPlayerPrefs(eMonsterType eMonType, eGoodsState eGoods) { if (eGoodsState.Disable == eGoods) { if (MIN_ENABLE_COUNT >= GetEnableMonstersToPlayerPrefs().Count) { Single.UI.ShowNotice("알림", "몬스터는 최소 5마리 이상입니다."); return; } } SHPlayerPrefs.SetInt(string.Format("Inventory_Monste_{0}", (int)eMonType), (int)eGoods); }
private async void OnClickLogin(string strEmail, string strPassword, bool bIsSave) { if (false == SHUtils.IsValidEmail(strEmail)) { var pUIRoot = await Single.UI.GetGlobalRoot(); pUIRoot.ShowAlert("올바른 이메일 형식이 아닙니다."); return; } JsonData json = new JsonData { ["email"] = strEmail, ["password"] = strPassword }; Single.Network.POST(SHAPIs.SH_API_LOGIN, json, async(reply) => { if (reply.isSucceed) { var pUserInfo = await Single.Table.GetTable <SHTableUserInfo>(); pUserInfo.LoadJsonTable(reply.data); SHPlayerPrefs.SetString("auth_email", bIsSave ? pUserInfo.UserEmail : string.Empty); SHPlayerPrefs.SetString("auth_password", bIsSave ? pUserInfo.Password : string.Empty); SHPlayerPrefs.SetInt("auth_is_save", bIsSave ? 1 : 2); SHPlayerPrefs.Save(); } var pUIRoot = await Single.UI.GetGlobalRoot(); pUIRoot.ShowAlert(reply.ToString(), () => { if (reply.isSucceed) { Single.Scene.LoadScene(eSceneType.Lobby, bIsUseFade: true); } }); }); }
void SetLanguage(eLanguage eLang) { m_eLanguage = eLang; SHPlayerPrefs.SetInt("ApplicationInfo_Language", (int)m_eLanguage); }
private void SetCoin(int iCoin) { SHPlayerPrefs.SetInt("Inventory_Coin", (m_iCoin = iCoin)); }
private void SetBestScore(int iScore) { SHPlayerPrefs.SetInt("BestScore", iScore); }