fix:1、添加h5 2、修复bug
This commit is contained in:
@@ -221,9 +221,12 @@ namespace ChillConnect
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
// Update 里判断改为:
|
||||
// 禁用输入时,直接跳过拖拽
|
||||
if (_inputDisableCount > 0)
|
||||
{
|
||||
// Debug.Log($"输入已禁用,直接跳过拖拽");
|
||||
return;
|
||||
}
|
||||
|
||||
// 初始化未完成,直接跳过拖拽
|
||||
if (!_initComplete)
|
||||
@@ -360,6 +363,8 @@ namespace ChillConnect
|
||||
_remainArrowCount = _levelConfig.arrows.Count;
|
||||
|
||||
InitView();
|
||||
|
||||
((com_money)ui.com_money).btn_ch.title = GameHelper.getDesByKey("ch_out_1");
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
@@ -727,12 +732,15 @@ namespace ChillConnect
|
||||
/// </summary>
|
||||
private void TriggerBlockFlash()
|
||||
{
|
||||
ui.t1.Play();
|
||||
|
||||
// 先终止正在播放的动画,避免叠加错乱
|
||||
ui.com_ficker.visible = true;
|
||||
ui.com_ficker.t0.Play(() =>
|
||||
{
|
||||
ui.com_ficker.visible = false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -53,6 +53,8 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
|
||||
|
||||
// GameHelper.SetCloseResult(false);
|
||||
closeCallback?.Invoke();
|
||||
// if (IsLevelSuccess && !GameHelper.is_first_login)
|
||||
@@ -69,6 +71,7 @@ namespace ChillConnect
|
||||
private SuccessData successData_;
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
ui.btn_gold.y += 68;
|
||||
@@ -76,7 +79,7 @@ namespace ChillConnect
|
||||
|
||||
var anim_paly = FXManager.Instance.SetFx<SkeletonAnimation>(ui.btn_gold.GetChild("gold_anim") as GGraph, Fx_Type.fx_coin, ref closeCallback);
|
||||
anim_paly.state.SetAnimation(0, "animation", true);
|
||||
(ui.top_money as com_money).btn_ch.title = GameHelper.getDesByKey("ch_out_1");
|
||||
((com_money)ui.top_money).btn_ch.title = GameHelper.getDesByKey("ch_out_1");
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
ui.switchgift.selectedIndex = 1;
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ namespace ChillConnect
|
||||
|
||||
makeupTaskData = args as MakeupTaskData;
|
||||
ch_index = makeupTaskData.tableId - 1;
|
||||
ui.btn_earn.title = GameHelper.getDesByKey("ch_out_1");
|
||||
|
||||
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
|
||||
|
||||
@@ -26,8 +26,8 @@ namespace ChillConnect
|
||||
uiInfo.packageName = "ZM_Petty";
|
||||
uiInfo.assetName = "com_petty_award";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedOpenAnim = true;
|
||||
uiInfo.isNeedCloseAnim = true;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,8 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
SaveData.saveDataFunc();
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
|
||||
|
||||
closeCallback?.Invoke();
|
||||
@@ -87,7 +89,7 @@ namespace ChillConnect
|
||||
private void InitView()
|
||||
{
|
||||
_mLastState = SaveData.GetSaveObject().PettyState;
|
||||
Debug.Log($"PettyState============: {SaveData.GetSaveObject().PettyState}");
|
||||
// Debug.Log($"PettyState============: {SaveData.GetSaveObject().PettyState}");
|
||||
var num = GameHelper.GetCommonModel().SmallReward;
|
||||
ui.com_get_panel.text_reward.text = $"{GameHelper.Get102Str(num)} USD";
|
||||
|
||||
@@ -292,12 +294,46 @@ namespace ChillConnect
|
||||
if (pettyDataLimit != 0)
|
||||
{
|
||||
ui.com_detail.text_limit.SetVar("day", pettyDataLimit.ToString()).FlushVars();
|
||||
}else
|
||||
}
|
||||
else
|
||||
{
|
||||
var day = GameHelper.GetCommonModel().ProcessingTime;
|
||||
ui.com_detail.text_limit.SetVar("day", day.ToString()).FlushVars();
|
||||
SaveData.GetSaveObject().PettyDataLimit = day;
|
||||
}
|
||||
|
||||
if (!IsPettyDataExpired())
|
||||
{
|
||||
ui.com_detail.btn_redeem.visible = true;
|
||||
ui.com_detail.btn_redeem.SetClick(() =>
|
||||
{
|
||||
Debug.Log($"click redeem code view----------------------");
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RedeemCodeUI_Open);
|
||||
CtrlCloseUI();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsPettyDataExpired()
|
||||
{
|
||||
// 1. 获取保存的过期天数限制
|
||||
var pettyDataLimit = SaveData.GetSaveObject().PettyDataLimit;
|
||||
|
||||
// 2. 获取当前日期(去掉时分秒,只保留日期部分,避免当天误判)
|
||||
DateTime currentDate = DateTime.Now.Date;
|
||||
|
||||
// 3. 获取数据保存时的日期
|
||||
DateTime saveDate = DateTime.ParseExact(SaveData.GetSaveObject().PettyDateTime, "yyyy.MM.dd", System.Globalization.CultureInfo.InvariantCulture);
|
||||
|
||||
// 4. 计算时间差
|
||||
TimeSpan timeSpan = currentDate - saveDate;
|
||||
|
||||
// 5. 判断是否超出限制天数
|
||||
bool isExpired = timeSpan.TotalDays >= pettyDataLimit;
|
||||
|
||||
return isExpired;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Globalization;
|
||||
using DG.Tweening;
|
||||
using FairyGUI;
|
||||
using FGUI.Loading_25;
|
||||
|
||||
using FGUI.tixian;
|
||||
using UnityEngine;
|
||||
using IgnoreOPS;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
@@ -25,9 +21,9 @@ namespace ChillConnect
|
||||
uiInfo.packageName = "tixian";
|
||||
uiInfo.assetName = "com_redeem_code";
|
||||
uiInfo.layerType = UILayerType.Loading;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = false;
|
||||
uiInfo.isNeedOpenAnim = true;
|
||||
uiInfo.isNeedCloseAnim = true;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
@@ -49,7 +45,8 @@ namespace ChillConnect
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
|
||||
ui.btn_close1.SetClick(CtrlCloseUI);
|
||||
|
||||
InitView();
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
@@ -58,6 +55,30 @@ namespace ChillConnect
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
private void InitView()
|
||||
{
|
||||
ui.lab_mn2.text = GameHelper.Get101Str(0);
|
||||
|
||||
ui.lab_ticket.text = GameHelper.GetPriceInt(SaveData.GetSaveObject().PettyAmount);
|
||||
|
||||
var strings = ConfigSystem.GetConfig<CommonModel>().X_Redeemcode;
|
||||
ui.lab_code.text = strings;
|
||||
|
||||
ui.btn_copy.SetClick(() =>
|
||||
{
|
||||
GameHelper.CopyText(ui.lab_code.text);
|
||||
});
|
||||
|
||||
ui.btn_contact_us.SetClick(() =>
|
||||
{
|
||||
|
||||
});
|
||||
|
||||
ui.btn_close1.SetClick(CtrlCloseUI);
|
||||
|
||||
|
||||
}
|
||||
#region 消息
|
||||
|
||||
protected override void AddListener()
|
||||
|
||||
@@ -9,9 +9,9 @@ namespace ChillConnect
|
||||
private uint closeUIMsg = UICtrlMsg.RedeemCodeUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.PettyAwardModel) as PettyAwardModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
@@ -29,21 +29,19 @@ namespace ChillConnect
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
if (ui is { isClose: false })
|
||||
if (ui != null && !ui.isClose)
|
||||
{
|
||||
ui.Close();
|
||||
}
|
||||
|
||||
ui = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
public override uint GetOpenUIMsg(string uiName)
|
||||
{
|
||||
return openUIMsg;
|
||||
}
|
||||
|
||||
public override uint GetCloseUIMsg(string uiName)
|
||||
{
|
||||
return closeUIMsg;
|
||||
@@ -51,14 +49,23 @@ namespace ChillConnect
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
AppDispatcher.Instance.AddListener(AppMsg.UI_DisplayLoadingUI, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
AppDispatcher.Instance.RemoveListener(AppMsg.UI_DisplayLoadingUI, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
|
||||
|
||||
//open_sign();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user