fix:1、修复bug。2、删除json表,改为配置加载
This commit is contained in:
@@ -99,7 +99,7 @@ namespace ChillConnect
|
||||
private Vector2 _lastTouchPos;
|
||||
private bool _isDraging;
|
||||
// 拖拽边界留边(防止完全移出屏幕)
|
||||
private readonly float _dragBorder = 100f;
|
||||
private readonly float _dragBorder = -300f;
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -350,10 +350,12 @@ namespace ChillConnect
|
||||
{
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
ui.panel.y += Screen.safeArea.y - 15;
|
||||
ui.panel.y += Screen.safeArea.y - 25;
|
||||
ui.com_money.y += Screen.safeArea.y- 15;
|
||||
ui.com_gem.y += Screen.safeArea.y - 15;
|
||||
ui.btn_signin.y += Screen.safeArea.y - 15;
|
||||
ui.btn_signin.y += Screen.safeArea.y - 25;
|
||||
ui.com_gift.y += Screen.safeArea.y - 15;
|
||||
ui.btn_wv.y += Screen.safeArea.y - 25;
|
||||
}
|
||||
|
||||
ui.state.selectedIndex = GameHelper.IsGiftSwitch() ? 1 : 0;
|
||||
@@ -385,6 +387,8 @@ namespace ChillConnect
|
||||
}
|
||||
|
||||
GameHelper.IsShowFirstReward();
|
||||
|
||||
GameHelper.IsShowPettyReward();
|
||||
|
||||
GameHelper.ShowStatementView();
|
||||
}
|
||||
@@ -554,6 +558,12 @@ namespace ChillConnect
|
||||
_fingerTipObj.visible = false;
|
||||
_fingerTipObj.touchable = false;
|
||||
_fingerTipObj.sortingOrder = 9999;
|
||||
|
||||
|
||||
if (GameHelper.IsShowOpenGameUI() && HallManager.Instance.openTipsTimes >= 1)
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -603,6 +613,7 @@ namespace ChillConnect
|
||||
var vo = ConfigSystem.GetConfig<MakeupModel>().GetData(makeupTaskData.tableId);
|
||||
if (vo == null)
|
||||
{
|
||||
Debug.LogError("MakeupTaskData 为空");
|
||||
return;
|
||||
}
|
||||
GameHelper.showGameUI = false;
|
||||
@@ -628,7 +639,15 @@ namespace ChillConnect
|
||||
{
|
||||
ui.btn_wv.visible = false;
|
||||
}
|
||||
ui.btn_wv.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.H5UI_Open); });
|
||||
ui.btn_wv.SetClick(() =>
|
||||
{
|
||||
SDKOpenConfig openConfig = new SDKOpenConfig
|
||||
{
|
||||
normal = true,
|
||||
url = ""
|
||||
};
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
|
||||
});
|
||||
|
||||
ui.com_bottom.btn_skin.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.ArrowThemeUI_Open); });
|
||||
|
||||
@@ -1204,6 +1223,7 @@ namespace ChillConnect
|
||||
unit.GetChild("line").asGraph.color = lineColor;
|
||||
unit.visible = true;
|
||||
unit.touchable = true;
|
||||
unit.name = "Arrow_" + arrow.id;
|
||||
unit.onClick.Add(() => OnPathClick(arrow));
|
||||
|
||||
_viewContainer.AddChild(unit);
|
||||
@@ -1252,6 +1272,7 @@ namespace ChillConnect
|
||||
else if (type == 1)
|
||||
{
|
||||
_isDeleteMode = !_isDeleteMode;
|
||||
GameHelper.ShowTips("You can delete any one of the arrows!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1709,6 +1730,7 @@ namespace ChillConnect
|
||||
if (icon != null) icon.color = arrowColor;
|
||||
|
||||
arrowIns.visible = true;
|
||||
arrowIns.name = "Arrow_" + arrow.id;
|
||||
arrowIns.onClick.Add(() => OnPathClick(arrow));
|
||||
_viewContainer.AddChild(arrowIns);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using FGUI.Arrow_game;
|
||||
using IgnoreOPS;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChillConnect
|
||||
@@ -59,6 +60,11 @@ namespace ChillConnect
|
||||
|
||||
HallManager.Instance.UpdateSecondEvent += UpdateCd;
|
||||
UpdateCd();
|
||||
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
|
||||
{
|
||||
ui.btn_watch.img_saveingpot.visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
|
||||
@@ -161,6 +161,7 @@ namespace ChillConnect
|
||||
{
|
||||
DataMgr.ArrowResultLevel.Value = 0;
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.reset_game, true);
|
||||
CtrlCloseUI();
|
||||
}
|
||||
else if (DataMgr.ArrowResultLevel.Value == 0)
|
||||
{
|
||||
@@ -169,10 +170,10 @@ namespace ChillConnect
|
||||
if (success)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.reset_game, true);
|
||||
CtrlCloseUI();
|
||||
}
|
||||
});
|
||||
}
|
||||
CtrlCloseUI();
|
||||
});
|
||||
|
||||
ui.com_arrow_end.btn_restart.SetClick(() =>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
|
||||
|
||||
|
||||
using DG.Tweening;
|
||||
using FGUI.ZM_H5_15;
|
||||
using IgnoreOPS;
|
||||
using SGModule.NetKit;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
@@ -43,10 +45,15 @@ namespace ChillConnect
|
||||
|
||||
HallManager.Instance.SetCameraVisible(true);
|
||||
|
||||
WebviewManager.Instance.setInH5View(false);
|
||||
WebviewManager.Instance.ShowH5View(false);
|
||||
|
||||
|
||||
if (_config.normal)
|
||||
{
|
||||
WebviewManager.Instance.setInH5View(false);
|
||||
WebviewManager.Instance.ShowH5View(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
FreeWebViewManager.Instance.CloseWeb();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -55,16 +62,31 @@ namespace ChillConnect
|
||||
ui = baseUI as FGUI.ZM_H5_15.com_webview;
|
||||
}
|
||||
|
||||
private SDKOpenConfig _config;
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
if (args is not SDKOpenConfig openConfig) return;
|
||||
|
||||
_config = openConfig;
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
|
||||
|
||||
// Debug.Log($"H5UI OpenBefore url: {_config.url} normal: {_config.normal}");
|
||||
if (_config.normal)
|
||||
{
|
||||
WebviewManager.Instance.setInH5View(true);
|
||||
WebviewManager.Instance.ShowH5View(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
DOVirtual.DelayedCall(0.2f, () =>
|
||||
{
|
||||
FreeWebViewManager.Instance.OpenWeb(_config.url);
|
||||
});
|
||||
}
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.hideBroadCast);
|
||||
// delayedCall = DOVirtual.DelayedCall(0.3f, () =>
|
||||
// {
|
||||
WebviewManager.Instance.setInH5View(true);
|
||||
WebviewManager.Instance.ShowH5View(true);
|
||||
|
||||
|
||||
ui.btn_close.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Close);
|
||||
|
||||
@@ -48,6 +48,9 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
|
||||
|
||||
HallManager.Instance.UpdateSecondEvent -= updateSpeedCD;
|
||||
HallManager.Instance.UpdateSecondEvent -= Update;
|
||||
HallManager.Instance.UpdateSecondEvent -= upTaskWatchAdsBtn;
|
||||
@@ -79,6 +82,9 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
|
||||
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
ui.group_.y += Screen.safeArea.y;
|
||||
@@ -89,7 +95,7 @@ namespace ChillConnect
|
||||
// DataMgr.Ticket.Value = 999999999; //zhushi
|
||||
|
||||
// WebviewManager.ShezhiACT(false);
|
||||
|
||||
WebviewManager.Instance.SetDarkThough(false);
|
||||
makeupTaskData = args as MakeupTaskData;
|
||||
ch_index = makeupTaskData.tableId - 1;
|
||||
ui.btn_earn.title = GameHelper.getDesByKey("ch_out_1");
|
||||
@@ -625,15 +631,16 @@ namespace ChillConnect
|
||||
return;
|
||||
}
|
||||
|
||||
ui.text_condi1.text = GameHelper.getChNumber(vo.item_need);
|
||||
ui.text_condi1.text = GameHelper.getChString(vo.item_need);
|
||||
ui.pb_condi1.max = vo.item_need;
|
||||
ui.text_ch_number.text = GameHelper.getChNumber(DataMgr.Ticket.Value);
|
||||
Debug.Log($"DataMgr.Ticket.Value==============={DataMgr.Ticket.Value}");
|
||||
ui.text_ch_number.text = GameHelper.getChString(DataMgr.Ticket.Value);
|
||||
var curValue = Math.Min(DataMgr.Ticket.Value, vo.item_need);
|
||||
ui.pb_condi1.value = (double)curValue;
|
||||
var textTitle = ui.pb_condi1.GetChild("title");
|
||||
if (textTitle != null)
|
||||
{
|
||||
textTitle.text = GameHelper.getChNumber(curValue) + "/" + GameHelper.getChNumber(vo.item_need);
|
||||
textTitle.text = GameHelper.getChString(curValue) + "/" + GameHelper.getChString(vo.item_need);
|
||||
}
|
||||
|
||||
var taskTime = (int)((float)vo.task_need / 60 * 100) * 0.01F;
|
||||
@@ -1050,8 +1057,13 @@ namespace ChillConnect
|
||||
ui.btn_contact_us.SetClick(() =>
|
||||
{
|
||||
// GameHelper.OpenEmail();
|
||||
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb);
|
||||
SDKOpenConfig openConfig = new SDKOpenConfig
|
||||
{
|
||||
normal = false,
|
||||
url = vo.T_ShopURL
|
||||
};
|
||||
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
|
||||
|
||||
CtrlCloseUI();
|
||||
});
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using DG.Tweening;
|
||||
using FGUI.Common_01;
|
||||
using FGUI.Game_04;
|
||||
using IgnoreOPS;
|
||||
using Spine.Unity;
|
||||
|
||||
namespace ChillConnect
|
||||
@@ -9,9 +12,8 @@ namespace ChillConnect
|
||||
{
|
||||
private OpenGameUICtrl ctrl;
|
||||
private OpenGameModel model;
|
||||
private com_open ui;
|
||||
private com_open_tips ui;
|
||||
private Action closeCallback;
|
||||
private bool need_show = true;
|
||||
|
||||
public OpenGameUI(OpenGameUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
@@ -21,12 +23,12 @@ namespace ChillConnect
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "Game_04";
|
||||
uiInfo.assetName = "com_open";
|
||||
uiInfo.packageName = "Common_01";
|
||||
uiInfo.assetName = "com_open_tips";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
@@ -42,23 +44,43 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as com_open;
|
||||
ui = baseUI as com_open_tips;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
if (args != null) need_show = (bool)args;
|
||||
string stage = GameHelper.gameType == 0 ? "Lv." + GameHelper.GetLevel() : "";
|
||||
ui.text_level.text = stage;
|
||||
try
|
||||
{
|
||||
// 添加空值检查,防止 NullReferenceException
|
||||
var makeupTaskHistory = DataMgr.MakeupTaskHistory?.Value;
|
||||
if (makeupTaskHistory != null && makeupTaskHistory.Any())
|
||||
{
|
||||
var makeupTaskData = makeupTaskHistory.Last();
|
||||
var config = ConfigSystem.GetConfig<MakeupModel>();
|
||||
if (config != null)
|
||||
{
|
||||
var vo = config.GetData(makeupTaskData.tableId);
|
||||
if (vo != null && ui?.text_level_limit != null)
|
||||
{
|
||||
var stage= vo.levels_need - GameHelper.GetLevel();
|
||||
if(stage <= 0)
|
||||
{
|
||||
stage = 1;
|
||||
}
|
||||
ui.text_level_limit.SetVar("x", stage.ToString()).FlushVars();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
throw;
|
||||
}
|
||||
|
||||
|
||||
InitView();
|
||||
|
||||
DOVirtual.DelayedCall(0.7f, () => { GameDispatcher.Instance.Dispatch(GameMsg.reset_game, args); });
|
||||
|
||||
if (AudioManager.Instance.IsOpenEffect)
|
||||
{
|
||||
AudioManager.Instance.PlayDynamicEffect(AudioConst.game_open);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
@@ -85,48 +107,19 @@ namespace ChillConnect
|
||||
}
|
||||
#endregion
|
||||
|
||||
//初始化页面逻辑
|
||||
//初始化页面逻辑`
|
||||
private void InitView()
|
||||
{
|
||||
|
||||
|
||||
// var sk = FXManager.Instance.SetFx<SkeletonAnimation>(ui.anim, Fx_Type.fx_open, ref closeCallback);
|
||||
// sk.state.SetAnimation(0, "animation", false);
|
||||
|
||||
|
||||
// DOVirtual.DelayedCall(2.8f, () =>
|
||||
// {
|
||||
// ui.bg.visible = false;
|
||||
// });
|
||||
ui.t0.Play();
|
||||
DOVirtual.DelayedCall(1.5f, () =>
|
||||
ui.t0.Play(() =>
|
||||
{
|
||||
// ui.anim.visible = false;
|
||||
if (need_show&&GameHelper.IsGiftSwitch()) {
|
||||
if (GameHelper.IsShowLevelTips())
|
||||
{
|
||||
// ui.tips_node.visible = false;
|
||||
DOVirtual.DelayedCall(0.2f, ()=>{
|
||||
// ui.tips_node.visible = true;
|
||||
var meteor1 = FXManager.Instance.SetFx<SkeletonAnimation>(ui.tips_node, Fx_Type.fx_tips, ref closeCallback);
|
||||
meteor1.state.SetAnimation(0, "animation", false);
|
||||
meteor1.state.Complete += a =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close);
|
||||
};
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close);
|
||||
}
|
||||
} else {
|
||||
DOVirtual.DelayedCall(0.4f, () =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close);
|
||||
});
|
||||
}
|
||||
DOVirtual.DelayedCall(0.2f, () =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,7 +105,7 @@ namespace ChillConnect
|
||||
ui.text_list.EnsureBoundsCorrect();
|
||||
});
|
||||
|
||||
ui.btn_close.SetClick(CtrlCloseUI);
|
||||
ui.btn_back.SetClick(CtrlCloseUI);
|
||||
}
|
||||
|
||||
public string[] getstr(string strs, int len)
|
||||
|
||||
@@ -72,9 +72,13 @@ namespace ChillConnect
|
||||
|
||||
ui.btn_contact_us.SetClick(() =>
|
||||
{
|
||||
|
||||
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb);
|
||||
SDKOpenConfig openConfig = new SDKOpenConfig
|
||||
{
|
||||
normal = false,
|
||||
url = ConfigSystem.GetConfig<CommonModel>().X_ShopURL
|
||||
};
|
||||
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb, openConfig);
|
||||
CtrlCloseUI();
|
||||
});
|
||||
|
||||
|
||||
@@ -59,7 +59,13 @@ namespace ChillConnect
|
||||
|
||||
InitData();
|
||||
InitView();
|
||||
// ui.btn_null.SetClick(() => { });
|
||||
// ui.btn_null.SetClick(() => { });+
|
||||
|
||||
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
|
||||
{
|
||||
ui.btn_multi.GetChild("img_saveingpot").visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
|
||||
@@ -614,8 +614,15 @@ namespace ChillConnect
|
||||
ui.btn_contact_us.SetClick(() =>
|
||||
{
|
||||
// GameHelper.OpenEmail();
|
||||
|
||||
SDKOpenConfig openConfig = new SDKOpenConfig
|
||||
{
|
||||
normal = false,
|
||||
url = vo.C_ShopURL
|
||||
};
|
||||
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb);
|
||||
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
|
||||
|
||||
CtrlCloseUI();
|
||||
});
|
||||
@@ -877,7 +884,7 @@ namespace ChillConnect
|
||||
|
||||
ui.com_pay.btn_change.SetClick(() =>
|
||||
{
|
||||
DataMgr.ExchangeName = null;
|
||||
DataMgr.ExchangeName.Value = null;
|
||||
DataMgr.ExchangeAccount.Value = null;
|
||||
OnEnter();
|
||||
|
||||
|
||||
@@ -41,6 +41,11 @@ namespace ChillConnect
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
|
||||
|
||||
//open_sign();
|
||||
|
||||
if (GameHelper.IsShowOpenGameUI() &&HallManager.Instance.openTipsTimes == 1)
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
@@ -48,8 +53,11 @@ namespace ChillConnect
|
||||
ui = baseUI as FGUI.Lobby_03.com_statement;
|
||||
}
|
||||
|
||||
private bool need_show = false;
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
HallManager.Instance.openTipsTimes++;
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
|
||||
|
||||
InitView();
|
||||
|
||||
Reference in New Issue
Block a user