提交
This commit is contained in:
@@ -59,9 +59,9 @@ namespace BingoBrain
|
|||||||
AppDispatcher.Instance.Dispatch(CsjInfoC.AppManagerRegister);
|
AppDispatcher.Instance.Dispatch(CsjInfoC.AppManagerRegister);
|
||||||
AppDispatcher.Instance.Dispatch(CsjInfoC.InitUIMgr);
|
AppDispatcher.Instance.Dispatch(CsjInfoC.InitUIMgr);
|
||||||
AppDispatcher.Instance.AddListener(CsjInfoC.LoginInit, OnLoadingComplete);
|
AppDispatcher.Instance.AddListener(CsjInfoC.LoginInit, OnLoadingComplete);
|
||||||
PreferencesMgr.Instance.InitPreferences();
|
// PreferencesMgr.Instance.InitPreferences();
|
||||||
NetworkDispatcher.Instance.Dispatch(ExternalInfo.GetConfig);//quxiaozhushi
|
// NetworkDispatcher.Instance.Dispatch(ExternalInfo.GetConfig);//quxiaozhushi
|
||||||
NetworkDispatcher.Instance.AddListener(NetworkMsg.Start, ShowScene);//quxiaozhushi
|
// NetworkDispatcher.Instance.AddListener(NetworkMsg.Start, ShowScene);//quxiaozhushi
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnLoadingComplete(object param = null)
|
private void OnLoadingComplete(object param = null)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ namespace FGUI.JSettings
|
|||||||
{
|
{
|
||||||
public partial class com_setting : GComponent
|
public partial class com_setting : GComponent
|
||||||
{
|
{
|
||||||
|
public Controller gift;
|
||||||
public btn_6contact btn_contact;
|
public btn_6contact btn_contact;
|
||||||
public btn_record btn_record;
|
public btn_record btn_record;
|
||||||
public GTextField text_uid;
|
public GTextField text_uid;
|
||||||
@@ -29,6 +30,7 @@ namespace FGUI.JSettings
|
|||||||
{
|
{
|
||||||
base.ConstructFromXML(xml);
|
base.ConstructFromXML(xml);
|
||||||
|
|
||||||
|
gift = GetControllerAt(0);
|
||||||
btn_contact = (btn_6contact)GetChildAt(0);
|
btn_contact = (btn_6contact)GetChildAt(0);
|
||||||
btn_record = (btn_record)GetChildAt(1);
|
btn_record = (btn_record)GetChildAt(1);
|
||||||
text_uid = (GTextField)GetChildAt(3);
|
text_uid = (GTextField)GetChildAt(3);
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ namespace BingoBrain
|
|||||||
public static bool IsGiftSwitch()
|
public static bool IsGiftSwitch()
|
||||||
{
|
{
|
||||||
// return false;
|
// return false;
|
||||||
return true; //zhushi
|
// return true; //zhushi
|
||||||
// Debug.Log(GetLoginModel().is_magic);
|
// Debug.Log(GetLoginModel().is_magic);
|
||||||
return GetLoginModel().is_magic;
|
return GetLoginModel().is_magic;
|
||||||
}
|
}
|
||||||
@@ -1468,10 +1468,10 @@ namespace BingoBrain
|
|||||||
type = type
|
type = type
|
||||||
};
|
};
|
||||||
|
|
||||||
// NetworkKit.PostWithHeader<RespAdEventData>("event/adWatchOver", respData, (isSuccess, obj) =>
|
NetworkKit.PostWithHeader<RespAdEventData>("event/adWatchOver", respData, (isSuccess, obj) =>
|
||||||
// {
|
{
|
||||||
|
|
||||||
// });zhushi
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -71,10 +71,12 @@ namespace BingoBrain
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
preferences = ReadServerPreferencesCache();
|
preferences = ReadServerPreferencesCache();
|
||||||
|
// Debug.Log(preferences.uid);
|
||||||
if (preferences == null)
|
// Debug.Log(GameHelper.GetLoginModel().uid);
|
||||||
|
if (preferences == null || preferences.uid != GameHelper.GetLoginModel().uid)
|
||||||
{
|
{
|
||||||
preferences = new Preferences();
|
preferences = new Preferences();
|
||||||
|
preferences.uid = GameHelper.GetLoginModel().uid;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -162,7 +164,7 @@ namespace BingoBrain
|
|||||||
unsaveCount = 0;
|
unsaveCount = 0;
|
||||||
timeSave = GameHelper.GetNowTime();
|
timeSave = GameHelper.GetNowTime();
|
||||||
var data = Havva.ToObject<Dictionary<string, object>>(Havva.ToJson(preferences));
|
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)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,5 +33,6 @@ namespace BingoBrain
|
|||||||
|
|
||||||
|
|
||||||
public int playerXP;
|
public int playerXP;
|
||||||
|
public long uid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -125,17 +125,17 @@ namespace BingoBrain
|
|||||||
|
|
||||||
private void OnInitCompleted(object obj = null)
|
private void OnInitCompleted(object obj = null)
|
||||||
{
|
{
|
||||||
if (isFacebookLoginAndGetData)
|
// if (isFacebookLoginAndGetData)
|
||||||
{
|
// {
|
||||||
DOVirtual.DelayedCall(ctrl.netIdleTime, () =>
|
// DOVirtual.DelayedCall(ctrl.netIdleTime, () =>
|
||||||
{
|
// {
|
||||||
isFacebookLoginAndGetData = false;
|
// isFacebookLoginAndGetData = false;
|
||||||
PreferencesMgr.Instance.InitPreferences();
|
// PreferencesMgr.Instance.InitPreferences();
|
||||||
PreferencesMgr.Instance.PlayerAvatarId = 0;
|
// PreferencesMgr.Instance.PlayerAvatarId = 0;
|
||||||
uiCtrlDispatcher.Dispatch(SkinInfo.CheckReadyUI_Close);
|
// uiCtrlDispatcher.Dispatch(SkinInfo.CheckReadyUI_Close);
|
||||||
OnClickBtn();
|
// OnClickBtn();
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnClickBtn()
|
public void OnClickBtn()
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ namespace BingoBrain
|
|||||||
CtrlCloseUI();
|
CtrlCloseUI();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
ui.gift.selectedIndex = GameHelper.IsGiftSwitch() ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnClickSoundBtn()
|
private void OnClickSoundBtn()
|
||||||
@@ -96,7 +97,7 @@ namespace BingoBrain
|
|||||||
{
|
{
|
||||||
ui.text_version.SetVar("version", Application.version).FlushVars();
|
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_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;
|
ui.btn_sound.btn_on.cont_btn.selectedIndex = model.IsOpenEffect ? btn_on.Btn_on : btn_on.Btn_off;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,10 +95,10 @@ namespace BingoBrain
|
|||||||
}
|
}
|
||||||
//Debug.Log($"[UNITY] needDownloadConfigFile: {needDownloadConfigFile}");
|
//Debug.Log($"[UNITY] needDownloadConfigFile: {needDownloadConfigFile}");
|
||||||
//默默地拉去新配置
|
//默默地拉去新配置
|
||||||
// Debug.Log("kkkkkkkkkkkkkkkkkkkkkk" + needDownloadConfigFile);
|
Debug.Log("kkkkkkkkkkkkkkkkkkkkkk" + needDownloadConfigFile);
|
||||||
// Debug.Log("kkkkkkkkkkkkkkkkkkkkkk" + savedCfgName);
|
Debug.Log("kkkkkkkkkkkkkkkkkkkkkk" + savedCfgName);
|
||||||
|
|
||||||
if (false)
|
if (needDownloadConfigFile)
|
||||||
{
|
{
|
||||||
IsfvKit.StartCoroutine(CachKit.GetTextFromUrl($"{NetworkKit.CDNUrl}config/{CDNConfigFileName}",
|
IsfvKit.StartCoroutine(CachKit.GetTextFromUrl($"{NetworkKit.CDNUrl}config/{CDNConfigFileName}",
|
||||||
configFileName, (content) =>
|
configFileName, (content) =>
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ public class LoginSystem : BaseSystem
|
|||||||
|
|
||||||
if (isSuccess)
|
if (isSuccess)
|
||||||
{
|
{
|
||||||
|
Debug.Log("Login" + "-------------------" + JsonConvert.SerializeObject(loginData));
|
||||||
var loginModel = GameHelper.GetLoginModel();
|
var loginModel = GameHelper.GetLoginModel();
|
||||||
loginModel.cdn_url = loginData.cdn_url;
|
loginModel.cdn_url = loginData.cdn_url;
|
||||||
loginModel.setting = loginData.setting;
|
loginModel.setting = loginData.setting;
|
||||||
@@ -103,8 +104,9 @@ public class LoginSystem : BaseSystem
|
|||||||
|
|
||||||
}).AppendInterval(60).SetLoops(-1);
|
}).AppendInterval(60).SetLoops(-1);
|
||||||
//TimerHelper.UnscaleGeneral.AddLoopTimer(60, (timer) => { RequestHeart(); });
|
//TimerHelper.UnscaleGeneral.AddLoopTimer(60, (timer) => { RequestHeart(); });
|
||||||
//NetworkDispatcher.Instance.Dispatch(NetworkMsg.GetPlayData);
|
NetworkDispatcher.Instance.Dispatch(NetworkMsg.GetPlayData);
|
||||||
//UICtrlDispatcher.Instance.Dispatch(SkinInfo.EnterBingoUI_Open);
|
//UICtrlDispatcher.Instance.Dispatch(SkinInfo.EnterBingoUI_Open);
|
||||||
|
|
||||||
PreferencesMgr.Instance.PlayerName = loginData.invite_code;
|
PreferencesMgr.Instance.PlayerName = loginData.invite_code;
|
||||||
NetworkDispatcher.Instance.Dispatch(ExternalInfo.GetConfig);
|
NetworkDispatcher.Instance.Dispatch(ExternalInfo.GetConfig);
|
||||||
MaxADKit.Init();
|
MaxADKit.Init();
|
||||||
@@ -113,10 +115,7 @@ public class LoginSystem : BaseSystem
|
|||||||
{
|
{
|
||||||
GameObject.Find("MainCameraRoot").SetActive(false);
|
GameObject.Find("MainCameraRoot").SetActive(false);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
GameObject.Find("sheep_parent").SetActive(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -78,8 +78,8 @@ public class NetworkKit
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Debug.Log(url + "--------" + loginRequest.downloadHandler.text);
|
// Debug.Log(url + "--------" + loginRequest.downloadHandler.text);
|
||||||
Debug.Log(url + "--------" + receiveContent);
|
// Debug.Log(url + "--------" + receiveContent);
|
||||||
var response = SerializeUtil.ToObject<ResponseData>(receiveContent);
|
var response = SerializeUtil.ToObject<ResponseData>(receiveContent);
|
||||||
|
|
||||||
if (response?.code == 0)
|
if (response?.code == 0)
|
||||||
@@ -242,12 +242,12 @@ public class NetworkKit
|
|||||||
buriedPointObject.@event = eventname;
|
buriedPointObject.@event = eventname;
|
||||||
buriedPointObject.property = eventproperty;
|
buriedPointObject.property = eventproperty;
|
||||||
buriedPointObject.n = integer;
|
buriedPointObject.n = integer;
|
||||||
// PostWithHeader<BuriedPointObject>("/event/incrN", buriedPointObject, (isSuccess, obj) =>
|
PostWithHeader<BuriedPointObject>("/event/incrN", buriedPointObject, (isSuccess, obj) =>
|
||||||
// {
|
{
|
||||||
// // Debug.Log(isSuccess);
|
// Debug.Log(isSuccess);
|
||||||
// // Debug.Log(eventproperty);
|
// Debug.Log(eventproperty);
|
||||||
// //Debug.Log(JsonUtility.ToJson(obj));
|
//Debug.Log(JsonUtility.ToJson(obj));
|
||||||
// });zhushi
|
});
|
||||||
}
|
}
|
||||||
public static BuriedPointObject buriedPointObject = new BuriedPointObject();
|
public static BuriedPointObject buriedPointObject = new BuriedPointObject();
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public class PlayDataSystem : BaseSystem
|
|||||||
|
|
||||||
private void OnRequestPlayData(object args)
|
private void OnRequestPlayData(object args)
|
||||||
{
|
{
|
||||||
|
PreferencesMgr.Instance.InitPreferences();
|
||||||
NetworkKit.PostWithHeader<Preferences>("user/userData", (isSuccess, obj) =>
|
NetworkKit.PostWithHeader<Preferences>("user/userData", (isSuccess, obj) =>
|
||||||
{
|
{
|
||||||
var loginModel = GameHelper.GetLoginModel();
|
var loginModel = GameHelper.GetLoginModel();
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user