fix:1、同步ios修复的bug
This commit is contained in:
@@ -9,6 +9,7 @@ using FGUI.Arrow_game;
|
||||
using FGUI.Common_01;
|
||||
using IgnoreOPS;
|
||||
using UnityEngine;
|
||||
using btn_saveingpot = FGUI.Common_01.btn_saveingpot;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace ChillConnect
|
||||
@@ -98,7 +99,7 @@ namespace ChillConnect
|
||||
private Vector2 _lastTouchPos;
|
||||
private bool _isDraging;
|
||||
// 拖拽边界留边(防止完全移出屏幕)
|
||||
private readonly float _dragBorder = 100f;
|
||||
private readonly float _dragBorder = -300f;
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -347,6 +348,19 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
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 - 25;
|
||||
ui.com_gift.y += Screen.safeArea.y - 15;
|
||||
ui.btn_wv.y += Screen.safeArea.y - 25;
|
||||
}
|
||||
|
||||
ui.state.selectedIndex = GameHelper.IsGiftSwitch() ? 1 : 0;
|
||||
|
||||
|
||||
//加载配置
|
||||
// InitAllLevelData();
|
||||
LoadLevelConfig();
|
||||
@@ -365,6 +379,50 @@ namespace ChillConnect
|
||||
InitView();
|
||||
|
||||
((com_money)ui.com_money).btn_ch.title = GameHelper.getDesByKey("ch_out_1");
|
||||
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
|
||||
{
|
||||
ui.btn_saveingpot.visible = true;
|
||||
ui.com_gift.visible = true;
|
||||
}
|
||||
|
||||
GameHelper.IsShowFirstReward();
|
||||
|
||||
GameHelper.IsShowPettyReward();
|
||||
|
||||
GameHelper.ShowStatementView();
|
||||
}
|
||||
|
||||
private void RefreshGift(object obj = null)
|
||||
{
|
||||
ui.com_gift.text_gift.text = GameHelper.Get102Str((decimal)SaveData.GetSaveObject().saveingpot_ch);
|
||||
}
|
||||
|
||||
private void Set101(decimal coin = -1)
|
||||
{
|
||||
if (coin < 0)
|
||||
{
|
||||
coin = DataMgr.Coin.Value;
|
||||
}
|
||||
|
||||
if (ui.com_gem is com_gold btnCoin) btnCoin.text_gold.text = $"{coin:N0}";
|
||||
}
|
||||
|
||||
private void Set102()
|
||||
{
|
||||
decimal coin = DataMgr.Ticket.Value;
|
||||
|
||||
if (ui.com_money is com_money comMoney) comMoney.text_gold.text = coin.ToString("0.00");
|
||||
}
|
||||
|
||||
public void OnUpdate101(object obj = null)
|
||||
{
|
||||
Set101();
|
||||
}
|
||||
|
||||
public void OnUpdate102(object obj = null)
|
||||
{
|
||||
Set102();
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
@@ -390,6 +448,7 @@ namespace ChillConnect
|
||||
GameDispatcher.Instance.AddListener(GameMsg.UpdateSpeed, SetSpeed);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.UseProps, SetUserPorp);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.StopArrowTouch,OpenOrStopGameInput);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.refreshGift,RefreshGift);
|
||||
|
||||
}
|
||||
|
||||
@@ -402,6 +461,8 @@ namespace ChillConnect
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.UpdateSpeed, SetSpeed);
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.UseProps, SetUserPorp);
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.StopArrowTouch, OpenOrStopGameInput);
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.refreshGift,RefreshGift);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -487,12 +548,22 @@ namespace ChillConnect
|
||||
SetModel();
|
||||
|
||||
SetTopCurr();
|
||||
|
||||
Set101();
|
||||
|
||||
RefreshGift();
|
||||
|
||||
_fingerTipObj = com_finger.CreateInstance();
|
||||
_viewContainer.AddChild(_fingerTipObj);
|
||||
_fingerTipObj.visible = false;
|
||||
_fingerTipObj.touchable = false;
|
||||
_fingerTipObj.sortingOrder = 9999;
|
||||
|
||||
|
||||
if (GameHelper.IsShowOpenGameUI() && HallManager.Instance.openTipsTimes >= 1)
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -542,6 +613,7 @@ namespace ChillConnect
|
||||
var vo = ConfigSystem.GetConfig<MakeupModel>().GetData(makeupTaskData.tableId);
|
||||
if (vo == null)
|
||||
{
|
||||
Debug.LogError("MakeupTaskData 为空");
|
||||
return;
|
||||
}
|
||||
GameHelper.showGameUI = false;
|
||||
@@ -563,6 +635,20 @@ namespace ChillConnect
|
||||
uiCtrlDispatcher.Dispatch(UICtrlMsg.PersonViewUI_Open, _moveSpeed);
|
||||
});
|
||||
|
||||
if (!GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().WVswitch == 0)
|
||||
{
|
||||
ui.btn_wv.visible = false;
|
||||
}
|
||||
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); });
|
||||
|
||||
ui.btn_petty.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.PettyAwardUI_Open); });
|
||||
@@ -572,6 +658,8 @@ namespace ChillConnect
|
||||
ui.btn_statement.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.StatementViewUI_Open); });
|
||||
|
||||
ui.btn_saveingpot.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.SaveingPotUI_Open); });
|
||||
|
||||
ui.com_gift.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.SaveingPotUI_Open); });
|
||||
}
|
||||
|
||||
|
||||
@@ -1135,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);
|
||||
@@ -1183,6 +1272,7 @@ namespace ChillConnect
|
||||
else if (type == 1)
|
||||
{
|
||||
_isDeleteMode = !_isDeleteMode;
|
||||
GameHelper.ShowTips("You can delete any one of the arrows!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1640,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);
|
||||
|
||||
@@ -1883,12 +1974,15 @@ namespace ChillConnect
|
||||
/// </summary>
|
||||
private void DisappearLineGetReward()
|
||||
{
|
||||
|
||||
if (!GameHelper.IsGiftSwitch()) return;
|
||||
|
||||
bool isGet = false;
|
||||
|
||||
int money_rate = ConfigSystem.GetConfig<CommonModel>().rewardrate;
|
||||
var randomNum = UnityEngine.Random.Range(0, 100);
|
||||
// Debug.Log($"[creat] money_rate------------ {randomNum}==={money_rate}");
|
||||
if (GameHelper.IsGiftSwitch() && randomNum < money_rate)
|
||||
if (randomNum < money_rate)
|
||||
{
|
||||
isGet = true;
|
||||
|
||||
|
||||
@@ -51,12 +51,32 @@ namespace ChillConnect
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
|
||||
GameDispatcher.Instance.AddListener(GameMsg.Update101, OnUpdate101);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.Update102, OnUpdate102);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.Update101, OnUpdate101);
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.Update102, OnUpdate102);
|
||||
|
||||
}
|
||||
|
||||
private void OnUpdate101(object obj)
|
||||
{
|
||||
ui?.OnUpdate101(obj);
|
||||
}
|
||||
|
||||
|
||||
private void OnUpdate102(object obj)
|
||||
{
|
||||
ui?.OnUpdate102(obj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user