From cb2792aaa2c705963a62ca569bbf6a5e601306a4 Mon Sep 17 00:00:00 2001 From: changyunjia <905640960@qq.com> Date: Sat, 9 May 2026 14:47:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/BingoBrain/BingoScene.cs | 6 ++--- .../FGUI/Package/JSettings/com_setting.cs | 2 ++ Assets/BingoBrain/Harmony/GameHelper.cs | 8 +++---- Assets/BingoBrain/Manager/PreferencesMgr.cs | 10 ++++---- .../BingoBrain/Model/Game/Preferences_Base.cs | 1 + .../ModuleUI/EnterBingo/EnterBingoUI.cs | 22 +++++++++--------- Assets/BingoBrain/ModuleUI/JThink/JThinkUI.cs | 3 ++- Assets/BingoBrain/System/Game/JsonSystem.cs | 6 ++--- Assets/BingoSun/Scripts/LoginSystem.cs | 9 ++++--- Assets/BingoSun/Scripts/NetworkKit.cs | 16 ++++++------- Assets/BingoSun/Scripts/PlayDataSystem.cs | 1 + .../AssetHotFix/FGUI/JSettings_fui.bytes | Bin 7989 -> 8021 bytes 12 files changed, 45 insertions(+), 39 deletions(-) diff --git a/Assets/BingoBrain/BingoScene.cs b/Assets/BingoBrain/BingoScene.cs index 0f89eaa..f89de0d 100644 --- a/Assets/BingoBrain/BingoScene.cs +++ b/Assets/BingoBrain/BingoScene.cs @@ -59,9 +59,9 @@ namespace BingoBrain AppDispatcher.Instance.Dispatch(CsjInfoC.AppManagerRegister); AppDispatcher.Instance.Dispatch(CsjInfoC.InitUIMgr); AppDispatcher.Instance.AddListener(CsjInfoC.LoginInit, OnLoadingComplete); - PreferencesMgr.Instance.InitPreferences(); - NetworkDispatcher.Instance.Dispatch(ExternalInfo.GetConfig);//quxiaozhushi - NetworkDispatcher.Instance.AddListener(NetworkMsg.Start, ShowScene);//quxiaozhushi + // PreferencesMgr.Instance.InitPreferences(); + // NetworkDispatcher.Instance.Dispatch(ExternalInfo.GetConfig);//quxiaozhushi + // NetworkDispatcher.Instance.AddListener(NetworkMsg.Start, ShowScene);//quxiaozhushi } private void OnLoadingComplete(object param = null) diff --git a/Assets/BingoBrain/FGUI/Package/JSettings/com_setting.cs b/Assets/BingoBrain/FGUI/Package/JSettings/com_setting.cs index d633200..f27a4ed 100644 --- a/Assets/BingoBrain/FGUI/Package/JSettings/com_setting.cs +++ b/Assets/BingoBrain/FGUI/Package/JSettings/com_setting.cs @@ -7,6 +7,7 @@ namespace FGUI.JSettings { public partial class com_setting : GComponent { + public Controller gift; public btn_6contact btn_contact; public btn_record btn_record; public GTextField text_uid; @@ -29,6 +30,7 @@ namespace FGUI.JSettings { base.ConstructFromXML(xml); + gift = GetControllerAt(0); btn_contact = (btn_6contact)GetChildAt(0); btn_record = (btn_record)GetChildAt(1); text_uid = (GTextField)GetChildAt(3); diff --git a/Assets/BingoBrain/Harmony/GameHelper.cs b/Assets/BingoBrain/Harmony/GameHelper.cs index a7a2c89..56f4f90 100644 --- a/Assets/BingoBrain/Harmony/GameHelper.cs +++ b/Assets/BingoBrain/Harmony/GameHelper.cs @@ -395,7 +395,7 @@ namespace BingoBrain public static bool IsGiftSwitch() { // return false; - return true; //zhushi + // return true; //zhushi // Debug.Log(GetLoginModel().is_magic); return GetLoginModel().is_magic; } @@ -1468,10 +1468,10 @@ namespace BingoBrain type = type }; - // NetworkKit.PostWithHeader("event/adWatchOver", respData, (isSuccess, obj) => - // { + NetworkKit.PostWithHeader("event/adWatchOver", respData, (isSuccess, obj) => + { - // });zhushi + }); } /// diff --git a/Assets/BingoBrain/Manager/PreferencesMgr.cs b/Assets/BingoBrain/Manager/PreferencesMgr.cs index eeec13c..99ce7ca 100644 --- a/Assets/BingoBrain/Manager/PreferencesMgr.cs +++ b/Assets/BingoBrain/Manager/PreferencesMgr.cs @@ -69,12 +69,14 @@ namespace BingoBrain { preferences = loginModel.preferences ?? ReadServerPreferencesCache(); }*/ - - preferences = ReadServerPreferencesCache(); - if (preferences == null) + preferences = ReadServerPreferencesCache(); + // Debug.Log(preferences.uid); + // Debug.Log(GameHelper.GetLoginModel().uid); + if (preferences == null || preferences.uid != GameHelper.GetLoginModel().uid) { preferences = new Preferences(); + preferences.uid = GameHelper.GetLoginModel().uid; } else { @@ -162,7 +164,7 @@ namespace BingoBrain unsaveCount = 0; timeSave = GameHelper.GetNowTime(); var data = Havva.ToObject>(Havva.ToJson(preferences)); - // NetworkDispatcher.Instance.Dispatch(NetworkMsg.SavePlayData, data);zhushi + NetworkDispatcher.Instance.Dispatch(NetworkMsg.SavePlayData, data); } catch (Exception e) { diff --git a/Assets/BingoBrain/Model/Game/Preferences_Base.cs b/Assets/BingoBrain/Model/Game/Preferences_Base.cs index 983e9a5..65b873a 100644 --- a/Assets/BingoBrain/Model/Game/Preferences_Base.cs +++ b/Assets/BingoBrain/Model/Game/Preferences_Base.cs @@ -33,5 +33,6 @@ namespace BingoBrain public int playerXP; + public long uid; } } \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleUI/EnterBingo/EnterBingoUI.cs b/Assets/BingoBrain/ModuleUI/EnterBingo/EnterBingoUI.cs index 19fb29b..f8094db 100644 --- a/Assets/BingoBrain/ModuleUI/EnterBingo/EnterBingoUI.cs +++ b/Assets/BingoBrain/ModuleUI/EnterBingo/EnterBingoUI.cs @@ -125,17 +125,17 @@ namespace BingoBrain private void OnInitCompleted(object obj = null) { - if (isFacebookLoginAndGetData) - { - DOVirtual.DelayedCall(ctrl.netIdleTime, () => - { - isFacebookLoginAndGetData = false; - PreferencesMgr.Instance.InitPreferences(); - PreferencesMgr.Instance.PlayerAvatarId = 0; - uiCtrlDispatcher.Dispatch(SkinInfo.CheckReadyUI_Close); - OnClickBtn(); - }); - } + // if (isFacebookLoginAndGetData) + // { + // DOVirtual.DelayedCall(ctrl.netIdleTime, () => + // { + // isFacebookLoginAndGetData = false; + // PreferencesMgr.Instance.InitPreferences(); + // PreferencesMgr.Instance.PlayerAvatarId = 0; + // uiCtrlDispatcher.Dispatch(SkinInfo.CheckReadyUI_Close); + // OnClickBtn(); + // }); + // } } public void OnClickBtn() diff --git a/Assets/BingoBrain/ModuleUI/JThink/JThinkUI.cs b/Assets/BingoBrain/ModuleUI/JThink/JThinkUI.cs index 8d0949c..2bc22df 100644 --- a/Assets/BingoBrain/ModuleUI/JThink/JThinkUI.cs +++ b/Assets/BingoBrain/ModuleUI/JThink/JThinkUI.cs @@ -71,6 +71,7 @@ namespace BingoBrain CtrlCloseUI(); }); } + ui.gift.selectedIndex = GameHelper.IsGiftSwitch() ? 1 : 0; } private void OnClickSoundBtn() @@ -96,7 +97,7 @@ namespace BingoBrain { ui.text_version.SetVar("version", Application.version).FlushVars(); - ui.text_uid.text = "UID:"+GameHelper.GetLoginModel().uid ; + ui.text_uid.text = "UID:" + GameHelper.GetLoginModel().uid; ui.btn_music.btn_on.cont_btn.selectedIndex = model.IsOpenMusic ? btn_on.Btn_on : btn_on.Btn_off; ui.btn_sound.btn_on.cont_btn.selectedIndex = model.IsOpenEffect ? btn_on.Btn_on : btn_on.Btn_off; } diff --git a/Assets/BingoBrain/System/Game/JsonSystem.cs b/Assets/BingoBrain/System/Game/JsonSystem.cs index 97f8df4..4a73a0a 100644 --- a/Assets/BingoBrain/System/Game/JsonSystem.cs +++ b/Assets/BingoBrain/System/Game/JsonSystem.cs @@ -95,10 +95,10 @@ namespace BingoBrain } //Debug.Log($"[UNITY] needDownloadConfigFile: {needDownloadConfigFile}"); //默默地拉去新配置 - // Debug.Log("kkkkkkkkkkkkkkkkkkkkkk" + needDownloadConfigFile); - // Debug.Log("kkkkkkkkkkkkkkkkkkkkkk" + savedCfgName); + Debug.Log("kkkkkkkkkkkkkkkkkkkkkk" + needDownloadConfigFile); + Debug.Log("kkkkkkkkkkkkkkkkkkkkkk" + savedCfgName); - if (false) + if (needDownloadConfigFile) { IsfvKit.StartCoroutine(CachKit.GetTextFromUrl($"{NetworkKit.CDNUrl}config/{CDNConfigFileName}", configFileName, (content) => diff --git a/Assets/BingoSun/Scripts/LoginSystem.cs b/Assets/BingoSun/Scripts/LoginSystem.cs index bb02285..8ea97e0 100644 --- a/Assets/BingoSun/Scripts/LoginSystem.cs +++ b/Assets/BingoSun/Scripts/LoginSystem.cs @@ -72,6 +72,7 @@ public class LoginSystem : BaseSystem if (isSuccess) { + Debug.Log("Login" + "-------------------" + JsonConvert.SerializeObject(loginData)); var loginModel = GameHelper.GetLoginModel(); loginModel.cdn_url = loginData.cdn_url; loginModel.setting = loginData.setting; @@ -103,8 +104,9 @@ public class LoginSystem : BaseSystem }).AppendInterval(60).SetLoops(-1); //TimerHelper.UnscaleGeneral.AddLoopTimer(60, (timer) => { RequestHeart(); }); - //NetworkDispatcher.Instance.Dispatch(NetworkMsg.GetPlayData); + NetworkDispatcher.Instance.Dispatch(NetworkMsg.GetPlayData); //UICtrlDispatcher.Instance.Dispatch(SkinInfo.EnterBingoUI_Open); + PreferencesMgr.Instance.PlayerName = loginData.invite_code; NetworkDispatcher.Instance.Dispatch(ExternalInfo.GetConfig); MaxADKit.Init(); @@ -113,10 +115,7 @@ public class LoginSystem : BaseSystem { GameObject.Find("MainCameraRoot").SetActive(false); } - else - { - GameObject.Find("sheep_parent").SetActive(false); - } + } else { diff --git a/Assets/BingoSun/Scripts/NetworkKit.cs b/Assets/BingoSun/Scripts/NetworkKit.cs index bd8ff22..1f14a13 100644 --- a/Assets/BingoSun/Scripts/NetworkKit.cs +++ b/Assets/BingoSun/Scripts/NetworkKit.cs @@ -78,8 +78,8 @@ public class NetworkKit } #endif - Debug.Log(url + "--------" + loginRequest.downloadHandler.text); - Debug.Log(url + "--------" + receiveContent); + // Debug.Log(url + "--------" + loginRequest.downloadHandler.text); + // Debug.Log(url + "--------" + receiveContent); var response = SerializeUtil.ToObject(receiveContent); if (response?.code == 0) @@ -242,12 +242,12 @@ public class NetworkKit buriedPointObject.@event = eventname; buriedPointObject.property = eventproperty; buriedPointObject.n = integer; - // PostWithHeader("/event/incrN", buriedPointObject, (isSuccess, obj) => - // { - // // Debug.Log(isSuccess); - // // Debug.Log(eventproperty); - // //Debug.Log(JsonUtility.ToJson(obj)); - // });zhushi + PostWithHeader("/event/incrN", buriedPointObject, (isSuccess, obj) => + { + // Debug.Log(isSuccess); + // Debug.Log(eventproperty); + //Debug.Log(JsonUtility.ToJson(obj)); + }); } public static BuriedPointObject buriedPointObject = new BuriedPointObject(); diff --git a/Assets/BingoSun/Scripts/PlayDataSystem.cs b/Assets/BingoSun/Scripts/PlayDataSystem.cs index fe4db33..468160b 100644 --- a/Assets/BingoSun/Scripts/PlayDataSystem.cs +++ b/Assets/BingoSun/Scripts/PlayDataSystem.cs @@ -36,6 +36,7 @@ public class PlayDataSystem : BaseSystem private void OnRequestPlayData(object args) { + PreferencesMgr.Instance.InitPreferences(); NetworkKit.PostWithHeader("user/userData", (isSuccess, obj) => { var loginModel = GameHelper.GetLoginModel(); diff --git a/Assets/Resources/AssetHotFix/FGUI/JSettings_fui.bytes b/Assets/Resources/AssetHotFix/FGUI/JSettings_fui.bytes index 9283ff05f9254f88056ab61fd1bf1a335919ce8b..8920434a26e8fac8c839f66a4588066930e081ca 100644 GIT binary patch delta 952 zcmZWoOH5Ny5IwiAaQj*)g_iPKnpy}*42diZDnb5#p```oV@0b#DJmZo6-5RAT8$Vd zx-&L$ZK5H%kgzl^T(ffHf}JKTH1V@2&U+YQ;@mekcg}q8%zbZaS8E^DsRV<(!Po7c z%z2-JYV1SJMp^*oy?|U`b%wC$M#an(%$=t64I0qI!6JyLsM|=R9-@IhWQIi}X|h!|v28P2XjBGmt!U#YaZdQ2R-~U^ z6=*bN$q**`C4HiuQu&(fz<%}^p-M|#6&Ikepfg{Dzki8S{$D^B7Z5~INQjyI`?{s$A7hi`TN9mic zUKCS-TrQVzY$?iUM6R&~P|mlvfOd(IMIT=Rv}mwXPk?-|-;}DS8E`fyECMsyZ z-YHii$l)1Or}qm%(|WhN3Sn8mf+7?%dNslbE2!q;A=J=&eMqily$5UFon^HB(-;vgJvvyX~8%vx~R)+qft}X7(zEE z7qB?g+HbTvYPGn@lbm9z#_4~lJJr-k@@!5IDpdkLl%R~$0;mL>>RS^?IV{^Zk-E)R zxtD!@^wE&HL#o9YS}}hYkwksf6JpOwN|mUiJWIRe!&&w}CP!+MIQN&MfhJQcw(!i} zMBm_P(tVN8%P`)wTGM%MByw>9`RJ#qv<&GYE|IW$>1$f1)PMoj8?{m9_?n(u_tAva zBQDc3Yp-+#S1HxjqAtiaT&JilsP_K`ZqlMHAeD0e6??=zi1ID{Pb?EJk%ymn3%6;? z9+3PPqGfxh7^WXKr*sD+6m~>%M*laqW_4`C%xFy=TilV!vmPVQwurc!fRM*=kG<2h z$Jrz9tDq0?kn)@nF+np+PTg;ESmo$F>Rw?2q