fix:1、同步ios修复的bug

This commit is contained in:
2026-07-01 10:26:18 +08:00
parent 6ff428bdf2
commit af7617c352
1080 changed files with 2059 additions and 484310 deletions
@@ -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()
{
@@ -1,5 +1,6 @@
using System;
using FGUI.Arrow_game;
using IgnoreOPS;
using UnityEngine;
namespace ChillConnect
@@ -21,7 +22,7 @@ namespace ChillConnect
{
uiInfo.packageName = "Arrow_game";
uiInfo.assetName = "com_tips";
uiInfo.layerType = UILayerType.Loading;
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedUIMask = true;
uiInfo.isNeedOpenAnim = true;
uiInfo.isNeedCloseAnim = true;
@@ -36,6 +37,9 @@ namespace ChillConnect
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
CommonHelper.FadeOut(ui);
HallManager.Instance.UpdateSecondEvent -= UpdateCd;
}
protected override void OnBind()
@@ -43,12 +47,24 @@ namespace ChillConnect
ui = baseUI as com_tips;
}
private int state_;
protected override void OnOpenBefore(object args)
{
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
if (args != null)
{
InitView((int)args);
state_ = (int)args + 5;
}
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)
@@ -79,7 +95,7 @@ namespace ChillConnect
if (isSuccess)
{
Debug.Log($"isSuccess tips state = {state} ");
GameHelper.SetWatchCd(state_);
GameDispatcher.Instance.Dispatch(GameMsg.UseProps, state);
CtrlCloseUI();
}
@@ -88,5 +104,24 @@ namespace ChillConnect
ui.btn_close.SetClick(CtrlCloseUI);
}
private void UpdateCd()
{
var btnWatch = ui.btn_watch ;
// Debug.Log($"DataMgr.NewWatchCd.Value[state_ + 2]==={DataMgr.NewWatchCd.Value[state_ + 2]}");
if (DataMgr.NewWatchCd.Value[state_] > Convert.ToInt32(GameHelper.GetNowTime()))
{
btnWatch.enabled = false;
btnWatch.can.selectedIndex = 1;
btnWatch.text.text = CommonHelper.TimeFormat(DataMgr.NewWatchCd.Value[state_] - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
}
else
{
ui.btn_watch.enabled = true;
btnWatch.can.selectedIndex = 0;
btnWatch.text.text = "Use Item";
}
}
}
}
@@ -193,7 +193,7 @@ namespace ChillConnect
name = name[..4] + "...";
}
// text_ui.hide_text.text = GameHelper.getDesByKey("makeup_4");
var money_text = GameHelper.getChString(decimal.Parse(config_money_list[money_index]));
var money_text = GameHelper.Get102Str(decimal.Parse(config_money_list[money_index]));
string broad_text = String.Format(GameHelper.getDesByKey("makeup_4"), name, money_text, DateTimeManager.Instance.GetCurrDateTime());
text_ui.cast_text.text = broad_text;
ui.t0.Play();
@@ -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(() =>
+30 -7
View File
@@ -1,10 +1,11 @@
using DG.Tweening;
using FGUI.ZM_H5_15;
using IgnoreOPS;
using SGModule.NetKit;
using UNSDK;
using UnityEngine;
namespace ChillConnect
{
@@ -44,8 +45,15 @@ namespace ChillConnect
HallManager.Instance.SetCameraVisible(true);
SdkConfigMgr.Instance.Close();
if (_config.normal)
{
WebviewManager.Instance.setInH5View(false);
WebviewManager.Instance.ShowH5View(false);
}
else
{
// FreeWebViewManager.Instance.CloseWeb();
}
}
@@ -54,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);
GameDispatcher.Instance.Dispatch(GameMsg.hideBroadCast);
// delayedCall = DOVirtual.DelayedCall(0.3f, () =>
// {
// 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);
ui.btn_close.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Close);
@@ -11,7 +11,6 @@ using Newtonsoft.Json;
using SGModule.Net;
using SGModule.NetKit;
using UnityEngine;
using UNSDK;
using Random = UnityEngine.Random;
namespace ChillConnect
@@ -49,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;
@@ -56,6 +58,7 @@ namespace ChillConnect
GameHelper.showGameUI = true;
// WebviewManager.ShezhiACT(true);
WebviewManager.Instance.SetDarkThough(true);
gameDispatcher.Dispatch(GameMsg.MakeUpConfirmUIClosed);
@@ -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");
@@ -627,6 +633,7 @@ namespace ChillConnect
ui.text_condi1.text = GameHelper.getChString(vo.item_need);
ui.pb_condi1.max = vo.item_need;
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;
@@ -987,7 +994,7 @@ namespace ChillConnect
{
com_ticket_item item = (com_ticket_item)obj;
item.lab_num.text = GameHelper.getPrice(makeupTaskData.rdData[index].coupon_mount);
item.lab_num.text = GameHelper.GetPriceInt(makeupTaskData.rdData[index].coupon_mount);
if (makeupTaskData.rdData[index].isClaimed)
{
@@ -1055,7 +1062,8 @@ namespace ChillConnect
normal = false,
url = vo.T_ShopURL
};
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb, openConfig);
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
CtrlCloseUI();
});
+45 -52
View File
@@ -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);
});
});
}
}
}
@@ -121,7 +121,7 @@ namespace ChillConnect
ui.btn_privacy.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 0); });
ui.btn_terms.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 1); });
ui.btn_official.SetClick(() => { Application.OpenURL("http://captainsroll.com/"); });
ui.btn_official.SetClick(() => { OpenBrowser.OpenURL("http://captainsroll.com/"); });
ui.btn_us.SetClick(() => { GameHelper.OpenEmail(); });
@@ -302,7 +302,7 @@ namespace ChillConnect
SaveData.GetSaveObject().PettyDataLimit = day;
}
if (!IsPettyDataExpired())
if (IsPettyDataExpired())
{
ui.com_detail.btn_redeem.visible = true;
ui.com_detail.btn_redeem.SetClick(() =>
+1 -1
View File
@@ -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)
@@ -1,7 +1,6 @@
using FGUI.tixian;
using IgnoreOPS;
using UNSDK;
namespace ChillConnect
{
@@ -21,7 +20,7 @@ namespace ChillConnect
{
uiInfo.packageName = "tixian";
uiInfo.assetName = "com_redeem_code";
uiInfo.layerType = UILayerType.Loading;
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = true;
uiInfo.isNeedCloseAnim = true;
uiInfo.isNeedUIMask = true;
@@ -73,12 +72,12 @@ namespace ChillConnect
ui.btn_contact_us.SetClick(() =>
{
SDKOpenConfig openConfig = new SDKOpenConfig
{
normal = false,
url = ConfigSystem.GetConfig<CommonModel>().X_ShopURL
};
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb, openConfig);
CtrlCloseUI();
});
+12 -6
View File
@@ -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)
@@ -103,7 +109,7 @@ namespace ChillConnect
}
else
{
ui.btn_collect.title ="(" + "Claim(<img src='ui://o9974uc5k1oncy'/>" + GameHelper.Get101Str((decimal)value) + ")";
ui.btn_collect.title ="Claim(<img src='ui://o9974uc5npswda'/>" + GameHelper.Get101Str((decimal)value) + ")";
}
DOVirtual.DelayedCall(0.2f, () =>
{
@@ -164,7 +170,7 @@ namespace ChillConnect
}
cash_num = value;
var src = GameHelper.IsGiftSwitch() ? "(" : "(<img src='ui://o9974uc5cou6b8'/>";
var src = GameHelper.IsGiftSwitch() ? "(" : "(<img src='ui://o9974uc5npswda'/>";
(ui.wheel.GetChild("wheel_") as wheel_).t0.Play(Scroll);
(ui.wheel.GetChild("wheel_") as wheel_).t1.Play(() =>
{
@@ -189,7 +195,7 @@ namespace ChillConnect
}
void setItemUrl(GLoader loader, int urltype)
{
if (urltype == 0) loader.url = "ui://ZM_Common_01/cards_gold"; //jinbi
if (urltype == 0) loader.url = "ui://ZM_Common_01/gem_small"; //jinbi
else if (urltype == 1) loader.url = "ui://Common_01/spin_remove"; //yichu
else if (urltype == 2) loader.url = "ui://Common_01/spin_undo"; //chehui
else if (urltype == 3) loader.url = "ui://Common_01/spin_refresh"; //shuaxin
@@ -298,7 +304,7 @@ namespace ChillConnect
var src = "(";
var rewards = GameHelper.Get102Str((decimal)cash_num * boost_array[rate_idnex % boost_array.Length]);
if (!GameHelper.IsGiftSwitch()){
src = "(<img src='ui://o9974uc5cou6b8'/>";
src = "(<img src='ui://o9974uc5npswda'/>";
rewards = GameHelper.Get101Str((decimal)cash_num * boost_array[rate_idnex % boost_array.Length]);
}
@@ -357,7 +363,7 @@ namespace ChillConnect
// return;
// }
var src = GameHelper.IsGiftSwitch() ? "(" : "(<img src='ui://o9974uc5cou6b8'/>";
var src = GameHelper.IsGiftSwitch() ? "(" : "(<img src='ui://o9974uc5npswda'/>";
(ui.wheel.GetChild("wheel_") as wheel_).t1.Play(() =>
{
rate_idnex++;
@@ -12,7 +12,6 @@ using SGModule.Net;
using SGModule.NetKit;
using Spine.Unity;
using UnityEngine;
using UNSDK;
using Random = UnityEngine.Random;
namespace ChillConnect
@@ -56,9 +55,11 @@ namespace ChillConnect
AdRedeemManager.Instance.Destroy();
HallManager.Instance.UpdateSecondEvent -= updateSpeedCD;
HallManager.Instance.UpdateSecondEvent -= Update;
HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn;
closeCallback?.Invoke();
// WebviewManager.ShezhiACT(true);
WebviewManager.Instance.SetDarkThough(true);
GameDispatcher.Instance.Dispatch(GameMsg.RefreshSaveingPot);
if (SaveLocalData.GetSaveLocalObject().rankRewardData.Count > 0 && !HallManager.Instance.isShowRankView)
@@ -82,7 +83,8 @@ namespace ChillConnect
}
// WebviewManager.ShezhiACT(false);
WebviewManager.Instance.SetDarkThough(false);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Close);
@@ -112,6 +114,9 @@ namespace ChillConnect
HallManager.Instance.UpdateSecondEvent += Update;
updateSpeedCD();
InitBroadCast();
HallManager.Instance.UpdateSecondEvent += upLvWatchAdsBtn;
upLvWatchAdsBtn();
}
@@ -170,30 +175,34 @@ namespace ChillConnect
Debug.Log("iiiiiiiiiiiiiiiiiiiii");
if (SaveData.GetSaveObject().saveingpot_ch < makeupTaskData.amount)
{
ui.btn_ch.title = "Go";
((btn_watchAd)ui.btn_ch).watch.text = "Go";
ui.btn_ch.SetClick(() =>
{
// if (UIManager.Instance.IsExistUI(UIConst.HallUI))
// {
// GameDispatcher.Instance.Dispatch(GameMsg.MainTab, 1);
// }
// else
// {
// buygoldParam param = new buygoldParam()
// {
// isShow1 = false,
// is_in_game = true
// };
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Open, param);
// }
CtrlCloseUI();
GameHelper.ShowVideoAd("SaveingPotAd", isSuccess =>
{
if (isSuccess)
{
var ad_times = Convert.ToInt32(GameHelper.GetNowTime());
SaveData.GetSaveObject()._watch_ad_cd = ad_times + GameHelper.GetCommonModel().exchangeCD;
btn_watchAd btnWatchad = ui.btn_ch as btn_watchAd;
btnWatchad.enabled = false;
btnWatchad.can_buy.selectedIndex = 1;
btnWatchad.btn_text.text = CommonHelper.TimeFormat(SaveData.GetSaveObject()._watch_ad_cd - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
HallManager.Instance.UpdateSecondEvent += upLvWatchAdsBtn;
InitView();
}
});
});
}
else
{
ui.btn_ch.SetClick(() =>
btn_watchAd btnWatchad = ui.btn_ch as btn_watchAd;
btnWatchad.enabled = true;
btnWatchad.buy_state.selectedIndex = 1;
btnWatchad.title = "GET GIFT CARD";
btnWatchad.SetClick(() =>
{
makeupTaskData.needShowAni = false;
SaveData.saveDataFunc();
@@ -304,9 +313,37 @@ namespace ChillConnect
ui.btn_watch.enabled = true;
ui.btn_watch.show_cd.selectedIndex = 0;
}
}
private void upLvWatchAdsBtn()
{
var lastAdTimes = SaveData.GetSaveObject()._watch_ad_cd;
btn_watchAd btn_watchad = ui.btn_ch as btn_watchAd;
btn_watchad.img_saveingpot.visible = false;
if (SaveData.GetSaveObject().saveingpot_ch >= makeupTaskData.amount)
{
HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn;
InitView();
return;
}
if (GameHelper.GetNowTime() < lastAdTimes)
{
btn_watchad.enabled = false;
btn_watchad.can_buy.selectedIndex = 1;
btn_watchad.btn_text.text = CommonHelper.TimeFormat(lastAdTimes - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
}
else
{
HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn;
btn_watchad.enabled = true;
btn_watchad.can_buy.selectedIndex = 0;
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) btn_watchad.img_saveingpot.visible = true;
}
}
private void OnInline()
{
CheckBtnWatchStatus();
@@ -512,7 +549,7 @@ namespace ChillConnect
private void refreshItem(int index, GObject obj)
{
com_ticket_item item = (com_ticket_item)obj;
item.lab_num.text = GameHelper.getPrice(makeupTaskData.rdData[index].coupon_mount);
item.lab_num.text = GameHelper.GetPriceInt(makeupTaskData.rdData[index].coupon_mount);
if (makeupTaskData.rdData[index].isClaimed)
{
@@ -577,12 +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, openConfig);
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
CtrlCloseUI();
});
@@ -736,6 +776,8 @@ namespace ChillConnect
// DataMgr.MakeupTaskHistory.Save();
//OnInline();
SaveData.GetSaveObject().saveingpot_ch -= vo.item_need;
GameDispatcher.Instance.Dispatch(GameMsg.refreshGift);
SaveingPotHelper.CreatSaveingPotItem();
// Debug.Log(JsonConvert.SerializeObject(vo));
if (vo.id == 1)
@@ -818,7 +860,7 @@ namespace ChillConnect
return;
}
DataMgr.ExchangeAccount.Value= account;
DataMgr.ExchangeName .Value= $"{fname} {lname}";
DataMgr.ExchangeName.Value= $"{fname} {lname}";
DataMgr.short_name = fname;
DataMgr.long_name = lname;
showPaypal();
@@ -837,12 +879,12 @@ namespace ChillConnect
}
ui.com_pay.text_name.text = DataMgr.ExchangeName .Value;
ui.com_pay.text_name.text = DataMgr.ExchangeName.Value;
ui.com_pay.text_email.text = DataMgr.ExchangeAccount.Value;
ui.com_pay.btn_change.SetClick(() =>
{
DataMgr.ExchangeName = null;
DataMgr.ExchangeName.Value = null;
DataMgr.ExchangeAccount.Value = null;
OnEnter();
@@ -878,7 +920,7 @@ namespace ChillConnect
for (int i = 0; i < btn_list.Count; i++)
{
btn_list[i].text_ch.text = "$" + (int)makeup_list[i].item_need;
btn_list[i].text_ch.text = makeup_list[i].item_need + "";
Debug.Log(makeup_list[i].item_need);
btn_list[i].index.selectedIndex = i;
if (i >= saveingpot_history.Count)
@@ -140,6 +140,7 @@ namespace ChillConnect
btnSign.day.selectedIndex = 1;
btnSign.reward_num1.text = GameHelper.Get101Str(reward.quantity[1]);
setItemUrl(btnSign.loader_icon0, reward.rewards_type[1]);
btnSign.x = 300;
}
btnSign.anim_sign.visible = false;
@@ -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();