This commit is contained in:
2026-05-09 14:47:38 +08:00
parent 04351b9580
commit cb2792aaa2
12 changed files with 45 additions and 39 deletions
+3 -3
View File
@@ -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)
@@ -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);
+4 -4
View File
@@ -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<RespAdEventData>("event/adWatchOver", respData, (isSuccess, obj) =>
// {
NetworkKit.PostWithHeader<RespAdEventData>("event/adWatchOver", respData, (isSuccess, obj) =>
{
// });zhushi
});
}
/// <summary>
+5 -3
View File
@@ -71,10 +71,12 @@ namespace BingoBrain
}*/
preferences = ReadServerPreferencesCache();
if (preferences == null)
// 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<Dictionary<string, object>>(Havva.ToJson(preferences));
// NetworkDispatcher.Instance.Dispatch(NetworkMsg.SavePlayData, data);zhushi
NetworkDispatcher.Instance.Dispatch(NetworkMsg.SavePlayData, data);
}
catch (Exception e)
{
@@ -33,5 +33,6 @@ namespace BingoBrain
public int playerXP;
public long uid;
}
}
@@ -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()
@@ -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;
}
+3 -3
View File
@@ -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) =>
+4 -5
View File
@@ -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
{
+8 -8
View File
@@ -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<ResponseData>(receiveContent);
if (response?.code == 0)
@@ -242,12 +242,12 @@ public class NetworkKit
buriedPointObject.@event = eventname;
buriedPointObject.property = eventproperty;
buriedPointObject.n = integer;
// PostWithHeader<BuriedPointObject>("/event/incrN", buriedPointObject, (isSuccess, obj) =>
// {
// // Debug.Log(isSuccess);
// // Debug.Log(eventproperty);
// //Debug.Log(JsonUtility.ToJson(obj));
// });zhushi
PostWithHeader<BuriedPointObject>("/event/incrN", buriedPointObject, (isSuccess, obj) =>
{
// Debug.Log(isSuccess);
// Debug.Log(eventproperty);
//Debug.Log(JsonUtility.ToJson(obj));
});
}
public static BuriedPointObject buriedPointObject = new BuriedPointObject();
@@ -36,6 +36,7 @@ public class PlayDataSystem : BaseSystem
private void OnRequestPlayData(object args)
{
PreferencesMgr.Instance.InitPreferences();
NetworkKit.PostWithHeader<Preferences>("user/userData", (isSuccess, obj) =>
{
var loginModel = GameHelper.GetLoginModel();