public void OnGUI() { if (GUILayout.Button("清空记录")) { PrefsUtil.DeleteKey(RankMeDialog.RankMeShowKey); PrefsUtil.DeleteKey(RankMeDialog.RankMeShowTimeKey); PrefsUtil.Flush(); } var shown = PrefsUtil.GetBool(RankMeDialog.RankMeShowKey, false); var newValue = EditorGUILayout.Toggle("已显示", shown); if (newValue != shown) { PrefsUtil.SetBool(RankMeDialog.RankMeShowKey, newValue); PrefsUtil.Flush(); } var time = PrefsUtil.GetLong(RankMeDialog.RankMeShowTimeKey, 0); EditorGUILayout.LabelField("显示时间: " + time); if (GUILayout.Button("设置为当前时间")) { PrefsUtil.SetLong(RankMeDialog.RankMeShowTimeKey, DateTime.Now.CurrentTimeMillis()); PrefsUtil.Flush(); } _days = EditorGUILayout.FloatField("天数变化", _days); if (GUILayout.Button("设置天数变化")) { time = PrefsUtil.GetLong(RankMeDialog.RankMeShowTimeKey, 0); PrefsUtil.SetLong(RankMeDialog.RankMeShowTimeKey, time + (long)(1000 * 3600 * 24 * _days)); PrefsUtil.Flush(); } }
public void OnZhengLieToggleChange(bool isSelected) { if (isSelected) { PrefsUtil.SetBool(PrefsKeys.XuanDanZhangKey, false); PrefsUtil.Flush(); } }
public void SetBgmEnable(bool enable) { PrefsUtil.SetBool(PrefsKeys.BgmEnable, enable); PrefsUtil.Flush(); if (BgmPlayer) { if (enable) { PlayBgm(); } else { StopBgm(); } } }
public void GoRank() { _appId = GetConfigHolder().AppId; if (string.IsNullOrEmpty(_appId)) { return; } GetIosSDK().OpenUrl(string.Format("itms-apps://itunes.apple.com/app/id{0}", _appId)); // _ios.OpenProductPage(_appId, null); PrefsUtil.SetBool(RankMeShowKey, true); PrefsUtil.Flush(); GetAnalyticManager().Event("rank_me_panel_go"); Hide(); }
public void SetBgOn(bool on) { PrefsUtil.SetBool(BgConstant.EnableBgKey, on); PrefsUtil.Flush(); }
public void OnDanZhangModeChange() { PrefsUtil.SetBool(PrefsKeys.XuanDanZhangKey, DanZhangToggle.isOn); PrefsUtil.Flush(); }
public void OnGUI() { if (GUILayout.Button("清空登陆类型")) { PrefsUtil.SetInt(LoginRecord.LoginTypeKey, LoginRecord.NoLogin); PrefsUtil.Flush(); } if (GUILayout.Button("清空DeviceId和Username")) { PrefsUtil.SetString(LoginRecord.VisitorIdKey, ""); PrefsUtil.SetString(LoginRecord.VisitorUsernameKey, ""); PrefsUtil.Flush(); } if (GUILayout.Button("清空公告")) { PrefsUtil.SetString(BillboardPanel.BillboardContentKey, ""); PrefsUtil.SetLong(BillboardPanel.BillboardTimestampKey, 0); PrefsUtil.Flush(); } if (GUILayout.Button("清空选牌类型引导")) { PrefsUtil.SetBool(PrefsKeys.HasGuideSelectPoker, false); PrefsUtil.Flush(); } if (GUILayout.Button(("清空记录选牌的方式"))) { PrefsUtil.DeleteKey(PrefsKeys.XuanDanZhangKey); PrefsUtil.DeleteKey(PrefsKeys.HasGuideSelectPoker); PrefsUtil.Flush(); } if (GUILayout.Button("清空更新记录")) { PrefsUtil.DeleteKey(LoginRecord.DontUpdateDateKey); PrefsUtil.Flush(); } _content = EditorGUILayout.TextField("版本号", _content); if (GUILayout.Button("清空初始化Cache记录")) { PrefsUtil.SetString("InitAssetKey", _content);; var key = PrefsKeys.AssetBundleInitializedKey + _content; PrefsUtil.DeleteKey(key); PrefsUtil.Flush(); } if (GUILayout.Button("清空所有记录的更新的AssetBundle记录")) { //路径 var fullPath = Application.streamingAssetsPath; //获取指定路径下面的所有资源文件 if (Directory.Exists(fullPath)) { var direction = new DirectoryInfo(fullPath); var files = direction.GetFiles("*", SearchOption.AllDirectories); Debug.Log(files.Length); for (var i = 0; i < files.Length; i++) { if (files[i].Name.EndsWith(".meta") || files[i].Name.EndsWith(".manifest")) { continue; } PrefsUtil.DeleteKey(files[i].Name); PrefsUtil.Flush(); Debug.Log("已清空:" + files[i].Name); } } } }
public void Confirm() { PrefsUtil.SetBool(PrefsKeys.HasGuideSelectPoker, true); PrefsUtil.Flush(); Hide(); }