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 9283ff0..8920434 100644 Binary files a/Assets/Resources/AssetHotFix/FGUI/JSettings_fui.bytes and b/Assets/Resources/AssetHotFix/FGUI/JSettings_fui.bytes differ