fix:1、添加sdk。2、修复bug
This commit is contained in:
@@ -83,7 +83,7 @@ namespace ChillConnect
|
||||
};
|
||||
ui.btn_removead.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open);
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open);
|
||||
tweer.Pause();
|
||||
});
|
||||
|
||||
|
||||
@@ -119,8 +119,8 @@ namespace ChillConnect
|
||||
HallManager.Instance.UpdateSecondEvent += timeEvent;
|
||||
|
||||
|
||||
var sk = FXManager.Instance.SetFx<SkeletonAnimation>(ui.broad_cast_text.bg_panel, Fx_Type.fx_broad, ref closeCallback);
|
||||
sk.state.SetAnimation(0, "animation", true);
|
||||
// var sk = FXManager.Instance.SetFx<SkeletonAnimation>(ui.broad_cast_text.bg_panel, Fx_Type.fx_broad, ref closeCallback);
|
||||
// sk.state.SetAnimation(0, "animation", true);
|
||||
}
|
||||
|
||||
private void OpenRecord()
|
||||
@@ -192,8 +192,9 @@ namespace ChillConnect
|
||||
{
|
||||
name = name[..4] + "...";
|
||||
}
|
||||
// text_ui.hide_text.text = GameHelper.getDesByKey("makeup_4");
|
||||
string broad_text = String.Format(GameHelper.getDesByKey("makeup_4"), name, config_money_list[money_index], DateTimeManager.Instance.GetCurrDateTime());
|
||||
// text_ui.hide_text.text = GameHelper.getDesByKey("makeup_4");
|
||||
var money_text = GameHelper.getChString(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();
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
using System;
|
||||
using FGUI.Common_01;
|
||||
using FGUI.Prop_09;
|
||||
using FGUI.store_17;
|
||||
using IgnoreOPS;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
@@ -38,6 +42,7 @@ namespace ChillConnect
|
||||
protected override void OnClose()
|
||||
{
|
||||
GameHelper.showGameUI = true;
|
||||
HallManager.Instance.UpdateSecondEvent -= UpdateCd;
|
||||
|
||||
}
|
||||
|
||||
@@ -50,6 +55,7 @@ namespace ChillConnect
|
||||
{
|
||||
|
||||
_price = ConfigSystem.GetConfig<CommonModel>().Purchaseprops;
|
||||
|
||||
|
||||
state_ = (int)args;
|
||||
ui.prop.selectedIndex = state_;
|
||||
@@ -66,6 +72,17 @@ namespace ChillConnect
|
||||
ui.btn_add.SetClick(AddProNum);
|
||||
ui.btn_jian.SetClick(ReduceProNum);
|
||||
|
||||
HallManager.Instance.UpdateSecondEvent += UpdateCd;
|
||||
UpdateCd();
|
||||
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) ui.img_saveingpot.visible = true;
|
||||
|
||||
|
||||
ui.btn_watch.SetClick(() =>
|
||||
{
|
||||
buyItem();
|
||||
});
|
||||
|
||||
}
|
||||
void buyItem()
|
||||
{
|
||||
@@ -83,25 +100,44 @@ namespace ChillConnect
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (DataMgr.NewWatchCd.Value[state_ + 2] < Convert.ToInt32(GameHelper.GetNowTime()))
|
||||
{
|
||||
GameHelper.ShowVideoAd("reward_prop", isSuccess =>
|
||||
{
|
||||
if (isSuccess)
|
||||
{
|
||||
GameHelper.SetWatchCd(state_ + 2);
|
||||
int numbers = GameHelper.GetItemNumber(state_);
|
||||
numbers++;
|
||||
GameHelper.SetItemNumber(state_, numbers);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh);
|
||||
GameHelper.ShowTips("The purchase was successful", true);
|
||||
|
||||
CtrlCloseUI();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
int price = _price * prop_num;
|
||||
if (GameHelper.CheckGoldNumber(price))
|
||||
{
|
||||
GameHelper.AddGoldNumber(-price);
|
||||
int numbers = GameHelper.GetItemNumber(state_);
|
||||
numbers += prop_num;
|
||||
GameHelper.SetItemNumber(state_, numbers);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
|
||||
GameHelper.ShowTips("The purchase was successful", true);
|
||||
|
||||
CtrlCloseUI();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
GameHelper.ShowTips("Not enough gold");
|
||||
}
|
||||
|
||||
// int price = _price * prop_num;
|
||||
// if (GameHelper.CheckGoldNumber(price))
|
||||
// {
|
||||
// GameHelper.AddGoldNumber(-price);
|
||||
// int numbers = GameHelper.GetItemNumber(state_);
|
||||
// numbers += prop_num;
|
||||
// GameHelper.SetItemNumber(state_, numbers);
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh);
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
|
||||
// GameHelper.ShowTips("The purchase was successful", true);
|
||||
//
|
||||
// CtrlCloseUI();
|
||||
//
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GameHelper.ShowTips("Not enough gold");
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@@ -130,6 +166,24 @@ namespace ChillConnect
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
private void UpdateCd()
|
||||
{
|
||||
btn_watchAd btnWatch = ui.btn_watch as btn_watchAd;
|
||||
// Debug.Log($"DataMgr.NewWatchCd.Value[state_ + 2]==={DataMgr.NewWatchCd.Value[state_ + 2]}");
|
||||
if (DataMgr.NewWatchCd.Value[state_ + 2] > Convert.ToInt32(GameHelper.GetNowTime()))
|
||||
{
|
||||
btnWatch.enabled = false;
|
||||
btnWatch.can_buy.selectedIndex = 1;
|
||||
btnWatch.btn_text.text = CommonHelper.TimeFormat(DataMgr.NewWatchCd.Value[state_ + 2] - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.btn_watch.enabled = true;
|
||||
btnWatch.can_buy.selectedIndex = 0;
|
||||
btnWatch.watch.text = "Watch AD";
|
||||
}
|
||||
}
|
||||
|
||||
private void AddProNum()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using FGUI.Prop_09;
|
||||
using IgnoreOPS;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
@@ -81,6 +82,7 @@ namespace ChillConnect
|
||||
int need_gold = ConfigSystem.GetConfig<CommonModel>().RevivalCoins;
|
||||
ui.btn_gold_buy.GetChild("text_gold").text = GameHelper.Get101Str(need_gold);
|
||||
|
||||
Debug.Log($"state===================:{state}");
|
||||
initProp(state);
|
||||
|
||||
// ui.btn_thanks.SetClick(() =>
|
||||
@@ -134,7 +136,8 @@ namespace ChillConnect
|
||||
{
|
||||
if (isSuccess)
|
||||
{
|
||||
GameHelper.SetLevelstate(1);
|
||||
// GameHelper.SetLevelstate(1);
|
||||
GameHelper.SetLevelstate(0);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Remake_state, true);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
|
||||
}
|
||||
@@ -146,7 +149,8 @@ namespace ChillConnect
|
||||
if (GameHelper.CheckGoldNumber(need_gold))
|
||||
{
|
||||
GameHelper.AddGoldNumber(-need_gold);
|
||||
GameHelper.SetLevelstate(2);
|
||||
// GameHelper.SetLevelstate(2);
|
||||
GameHelper.SetLevelstate(0);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Remake_state, true);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
|
||||
|
||||
@@ -200,7 +200,7 @@ namespace ChillConnect
|
||||
}
|
||||
Debug.Log(ui.input_msg.text);
|
||||
com_msg com_msg = (com_msg)UIPackage.CreateObject("Lobby_03", "com_msg");
|
||||
com_msg.text_msg.text = DataMgr.PlayerName + ":" + ui.input_msg.text;
|
||||
com_msg.text_msg.text = DataMgr.PlayerName.Value + ":" + ui.input_msg.text;
|
||||
list_user_arr.Add(DataMgr.PlayerName.Value);
|
||||
list_content_arr.Add(ui.input_msg.text);
|
||||
PlayerPrefs.SetInt("faq_time", (int)GameHelper.GetNowTime());
|
||||
|
||||
@@ -2,7 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using DG.Tweening;
|
||||
using Dont_Confuse;
|
||||
using IgnoreOPS;
|
||||
using FairyGUI;
|
||||
using FGUI.Common_01;
|
||||
using FGUI.GameResult_08;
|
||||
@@ -476,12 +476,12 @@ namespace ChillConnect
|
||||
ui.com_ch.ch_text.text = str;
|
||||
if ((float)DataMgr.Ticket.Value > vo.item_need)
|
||||
{
|
||||
ui.com_ch.progress.width = 590;
|
||||
ui.com_ch.progress.width = 656;
|
||||
ui.com_ch.progress_text.text = GameHelper.Get102Str(vo.item_need) + "/" + GameHelper.Get102Str(vo.item_need);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.com_ch.progress.width = 590 * ((float)DataMgr.Ticket.Value / vo.item_need);
|
||||
ui.com_ch.progress.width = 656 * ((float)DataMgr.Ticket.Value / vo.item_need);
|
||||
ui.com_ch.progress_text.text = GameHelper.Get102Str(DataMgr.Ticket.Value) + "/" + GameHelper.Get102Str(vo.item_need);
|
||||
}
|
||||
|
||||
@@ -492,12 +492,12 @@ namespace ChillConnect
|
||||
// ui.com_ch.ch_text.text = "Cumulataive " + (vo.task_need / 60) + @" minutes in ""Game"" to cash out";
|
||||
// if ((float)DataMgr.MakeupTaskH5Time > vo.task_need)
|
||||
// {
|
||||
// ui.com_ch.progress.width = 590;
|
||||
// ui.com_ch.progress.width = 656;
|
||||
// ui.com_ch.progress_text.text = (vo.task_need / 60) + "/" + (vo.task_need / 60);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ui.com_ch.progress.width = 590 * ((float)DataMgr.MakeupTaskH5Time / vo.task_need);
|
||||
// ui.com_ch.progress.width = 656 * ((float)DataMgr.MakeupTaskH5Time / vo.task_need);
|
||||
// ui.com_ch.progress_text.text = Math.Round(((float)(DataMgr.MakeupTaskH5Time / 60)), 2) + "/" + (vo.task_need / 60);
|
||||
// }
|
||||
//
|
||||
@@ -509,12 +509,12 @@ namespace ChillConnect
|
||||
ui.com_ch.ch_text.text = str;
|
||||
if (makeupTaskData.videoCount > vo.ad_need)
|
||||
{
|
||||
ui.com_ch.progress.width = 590;
|
||||
ui.com_ch.progress.width = 656;
|
||||
ui.com_ch.progress_text.text = vo.ad_need + "/" + vo.ad_need;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.com_ch.progress.width = 590 * ((float)makeupTaskData.videoCount / vo.ad_need);
|
||||
ui.com_ch.progress.width = 656 * ((float)makeupTaskData.videoCount / vo.ad_need);
|
||||
ui.com_ch.progress_text.text = makeupTaskData.videoCount + "/" + vo.ad_need;
|
||||
}
|
||||
}
|
||||
@@ -522,7 +522,7 @@ namespace ChillConnect
|
||||
{
|
||||
string str = string.Format(GameHelper.getDesByKey("makeup_3"), vo.levels_need);
|
||||
ui.com_ch.ch_text.text = str;
|
||||
ui.com_ch.progress.width = 590 * (GameHelper.GetLevel() - 1) / vo.levels_need;
|
||||
ui.com_ch.progress.width = 656 * (GameHelper.GetLevel() - 1) / vo.levels_need;
|
||||
ui.com_ch.progress_text.text = (GameHelper.GetLevel() - 1) + "/" + vo.levels_need;
|
||||
}
|
||||
else
|
||||
@@ -538,7 +538,7 @@ namespace ChillConnect
|
||||
string str = string.Format(GameHelper.getDesByKey("makeup_2"), vo1.item_need);
|
||||
ui.com_ch.ch_text.text = str;
|
||||
|
||||
ui.com_ch.progress.width = 590f * ((float)(DataMgr.Ticket.Value - vo.item_need) / vo1.item_need);
|
||||
ui.com_ch.progress.width = 656f * ((float)(DataMgr.Ticket.Value - vo.item_need) / vo1.item_need);
|
||||
ui.com_ch.progress_text.text = GameHelper.Get102Str((DataMgr.Ticket.Value - vo.item_need)) + "/" + GameHelper.Get102Str(vo1.item_need);
|
||||
|
||||
|
||||
@@ -551,12 +551,12 @@ namespace ChillConnect
|
||||
ui.com_ch.ch_text.text = str;
|
||||
if (makeupTaskData.videoCount > vo1.ad_need)
|
||||
{
|
||||
ui.com_ch.progress.width = 590f;
|
||||
ui.com_ch.progress.width = 656f;
|
||||
ui.com_ch.progress_text.text = vo1.ad_need + "/" + vo1.ad_need;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.com_ch.progress.width = 590f * ((float)makeupTaskData.videoCount / vo1.ad_need);
|
||||
ui.com_ch.progress.width = 656f * ((float)makeupTaskData.videoCount / vo1.ad_need);
|
||||
ui.com_ch.progress_text.text = makeupTaskData.videoCount + "/" + vo1.ad_need;
|
||||
}
|
||||
}
|
||||
@@ -564,7 +564,7 @@ namespace ChillConnect
|
||||
{
|
||||
string str = string.Format(GameHelper.getDesByKey("makeup_3"), vo1.levels_need);
|
||||
ui.com_ch.ch_text.text = str;
|
||||
ui.com_ch.progress.width = 590f * (GameHelper.GetLevel() - 1) / vo1.levels_need;
|
||||
ui.com_ch.progress.width = 656f * (GameHelper.GetLevel() - 1) / vo1.levels_need;
|
||||
ui.com_ch.progress_text.text = (GameHelper.GetLevel() - 1) + "/" + vo1.levels_need;
|
||||
}
|
||||
|
||||
@@ -573,8 +573,18 @@ namespace ChillConnect
|
||||
|
||||
string str = string.Format(GameHelper.getDesByKey("makeup_3"), vo1.levels_need);
|
||||
ui.com_ch.ch_text.text = str;
|
||||
ui.com_ch.progress.width = 590f * (GameHelper.GetLevel() - 1) / vo1.levels_need;
|
||||
ui.com_ch.progress_text.text = (GameHelper.GetLevel() - 1) + "/" + vo1.levels_need;
|
||||
ui.com_ch.progress.width = 656f * (GameHelper.GetLevel() - 1) / vo1.levels_need;
|
||||
if (GameHelper.GetLevel() > vo1.levels_need)
|
||||
{
|
||||
ui.com_ch.progress.width = 656f;
|
||||
ui.com_ch.progress_text.text = vo1.levels_need + "/" + vo1.levels_need;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.com_ch.progress.width = 590f * (GameHelper.GetLevel() - 1) / vo1.levels_need;
|
||||
ui.com_ch.progress_text.text = (GameHelper.GetLevel() - 1) + "/" + vo1.levels_need;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f566f5ae793a4d869aac696880964a5f
|
||||
timeCreated: 1780995558
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
|
||||
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class H5Ctrl : BaseCtrl
|
||||
{
|
||||
public static H5Ctrl Instance { get; private set; }
|
||||
|
||||
private H5Model model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.H5Model) as H5Model;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f0d89ff894a1074494420d446333bfc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class H5Model : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ad9b45c44f492b4a97fc9845e2972a8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,253 @@
|
||||
|
||||
|
||||
|
||||
using FGUI.ZM_H5_15;
|
||||
using IgnoreOPS;
|
||||
using SGModule.NetKit;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class H5UI : BaseUI
|
||||
{
|
||||
private H5UICtrl ctrl;
|
||||
private H5Model model;
|
||||
private com_webview ui;
|
||||
|
||||
public H5UI(H5UICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.H5UI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "ZM_H5_15";
|
||||
uiInfo.assetName = "com_webview";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.H5Model) as H5Model;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.showBroadCast);
|
||||
WebviewManager.Instance.setInH5View(false);
|
||||
WebviewManager.Instance.ShowH5View(false);
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.ZM_H5_15.com_webview;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
|
||||
WebviewManager.Instance.setInH5View(true);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.hideBroadCast);
|
||||
// delayedCall = DOVirtual.DelayedCall(0.3f, () =>
|
||||
// {
|
||||
WebviewManager.Instance.ShowH5View(true);
|
||||
|
||||
ui.btn_close.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Close);
|
||||
});
|
||||
InitView();
|
||||
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDisplay(object args)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
// ui.btn_out.SetClick(() =>
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MakeupConfirmUI_Open);
|
||||
// });
|
||||
}
|
||||
public void ClickBtn(string name)
|
||||
{
|
||||
// // Debug.Log("[UNITY] Click btn: " + name);
|
||||
// FGUIHelper.PlayClickSound();
|
||||
if (name == "flyBtn")
|
||||
{
|
||||
OnClickFlyCash();
|
||||
//NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior,BuriedPointEvent.collect_fly_people,1);
|
||||
|
||||
// TrackKit.SendEvent(HallBehaviorTrack.Event, HallBehaviorTrack.Property.collect_fly_number);
|
||||
TrackKit.SendEvent(Property.Event, Property.CollectFlyNumber);
|
||||
}
|
||||
else if (name == "rewardBtn")
|
||||
{
|
||||
OnClickIcon();
|
||||
|
||||
}
|
||||
}
|
||||
private void OnClickFlyCash()
|
||||
{
|
||||
// PreferencesMgr.Instance.AdCashFlyShowTime =
|
||||
// GameHelper.GetNowTime() + ConfigSystem.GetConfig<CommonModel>().flyCD;
|
||||
// var rewardData = new RewardData();
|
||||
|
||||
// var singleValue =
|
||||
// (decimal)Math.Round(
|
||||
// UnityEngine.Random.Range(ConfigSystem.GetConfig<CommonModel>().flyReward[0],
|
||||
// ConfigSystem.GetConfig<CommonModel>().flyReward[1]), 2);
|
||||
|
||||
|
||||
// decimal rewardValue;
|
||||
|
||||
|
||||
// if (flyClickCount >= flyNeedClickCount)
|
||||
// {
|
||||
// flyClickCount = -1;
|
||||
// //var rate = GameHelper.GetVideoRate();
|
||||
// rewardValue = singleValue;
|
||||
// GameHelper.ShowVideoAd("reward_fly", isCompleted =>
|
||||
// {
|
||||
// if (isCompleted)
|
||||
// {
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// rewardValue = singleValue;
|
||||
// }
|
||||
|
||||
// var startPosition = GameHelper.GetUICenterPosition(ui.com_fly);
|
||||
// var endPosition = GameHelper.GetUICenterPosition(ui.com_top.text_num);
|
||||
|
||||
// var rewardSingleData = new RewardSingleData(102, rewardValue, RewardOrigin.H5Fly101)
|
||||
// {
|
||||
// startPosition = startPosition,
|
||||
// endPosition = new Vector2(endPosition.x - 150, endPosition.y - 106)
|
||||
// };
|
||||
|
||||
// rewardData.AddReward(rewardSingleData);
|
||||
// rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
|
||||
// rewardData.AddCompleted(isSuccess =>
|
||||
// {
|
||||
// if (isSuccess)
|
||||
// {
|
||||
// flyClickCount++;
|
||||
// }
|
||||
|
||||
// SetMakeup();
|
||||
// });
|
||||
// //GameHelper.addMoney((float)rewardValue);
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData);
|
||||
// CheckShowFly();
|
||||
}
|
||||
private void OnClickIcon()
|
||||
{
|
||||
// //WebThroughUtil.WebThroughClick(H5WebThroughType.OnlineH5, ui.btn_icon);
|
||||
// if (iconTime < ConfigSystem.GetConfig<CommonModel>().ThroughRewardCD)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// #if UNITY_IOS && !UNITY_EDITOR
|
||||
// WebviewManager.Instance.ShowH5View(false);
|
||||
// #endif
|
||||
|
||||
// float[] cash_array = GameHelper.GetRewardValue(2);
|
||||
|
||||
// // var temp = new { is_success = true, cash_number = cash_array[0], rate = cash_array[1], is_level_success = false, is_h5_reward = true };
|
||||
// SuccessData temp = new SuccessData();
|
||||
// temp.IsWin = true;
|
||||
// temp.cash_number = cash_array[0];
|
||||
// temp.rate = (int)cash_array[1];
|
||||
// temp.IsLevelSuccess = false;
|
||||
// temp.IsH5Reward = true;
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Open, temp);
|
||||
|
||||
// //UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RewardUI_Open);
|
||||
// // var rewardData = new RewardData();
|
||||
|
||||
// // var rewardType = 111;
|
||||
// // decimal rewardValue = (decimal)GameHelper.GetRewardValue(3)[0];
|
||||
|
||||
// // var rewardSingleData = new RewardSingleData(rewardType, rewardValue, RewardOrigin.H5Icon)
|
||||
// // {
|
||||
// // startPosition = GameHelper.GetUICenterPosition(ui.btn_icon),
|
||||
// // endPosition = GameHelper.GetUICenterPosition(ui.com_top.text_num)
|
||||
// // };
|
||||
// // rewardData.AddReward(rewardSingleData);
|
||||
// // rewardData.AddCompleted(isSuccess =>
|
||||
// // {
|
||||
// // ui.btn_icon.cont_state.selectedIndex = btn_icon.State_none;
|
||||
// // iconTime = 0;
|
||||
// // SetMakeup();
|
||||
// // });
|
||||
// // rewardData.condition = RewardCondition.AD;
|
||||
// // rewardData.displayType =
|
||||
// // RewardDisplayType.Dialog | RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
|
||||
|
||||
// // GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
|
||||
|
||||
// // GameHelper.addMoney((float)rewardValue);
|
||||
// // GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
|
||||
// // GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData);
|
||||
|
||||
|
||||
// iconTime = 0;
|
||||
// // SetMakeup();
|
||||
// NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior, BuriedPointEvent.annular_get_number, 1);
|
||||
}
|
||||
private void CheckShowFly()
|
||||
{
|
||||
// var nowTime = GameHelper.GetNowTime();
|
||||
// var leftTime = (int)(PreferencesMgr.Instance.AdCashFlyShowTime - nowTime);
|
||||
|
||||
// ui.com_fly.visible = false;
|
||||
// ui.com_fly.visible = leftTime <= 0;
|
||||
// if (leftTime > 0)
|
||||
// {
|
||||
// WebviewManager.Instance.ShowFlyBtn(false);
|
||||
// isFlyShow = false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //StartFly();
|
||||
// if (!isFlyShow) WebviewManager.Instance.ShowFlyBtn(true);
|
||||
// isFlyShow = true;
|
||||
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 345404ec69f13b84c9ce0415061b717b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,79 @@
|
||||
|
||||
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class H5UICtrl : BaseUICtrl
|
||||
{
|
||||
private H5UI ui;
|
||||
private H5Model model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.H5UI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.H5UI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.H5Model) as H5Model;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new H5UI(this);
|
||||
ui.Open(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
gameDispatcher.AddListener(GameMsg.H5ViewClickBtn, OnH5ClickBtn);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
gameDispatcher.RemoveListener(GameMsg.H5ViewClickBtn, OnH5ClickBtn);
|
||||
}
|
||||
void OnH5ClickBtn(object arg)
|
||||
{
|
||||
ui?.ClickBtn((string)arg);
|
||||
}
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74ecd6e2beb102e4e9eee8ad48c987d6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -84,6 +84,7 @@ namespace ChillConnect
|
||||
ui.top_group.y += 68;
|
||||
ui.left_group.y += 68;
|
||||
ui.right_group.y += 68;
|
||||
ui.btn_money.y += 60;
|
||||
}
|
||||
|
||||
// ui.com_panel.scrollPane.ScrollRight(12,false);
|
||||
@@ -117,6 +118,9 @@ namespace ChillConnect
|
||||
// HallManager.Instance.countTimes = 0;
|
||||
// }
|
||||
GameHelper.IsShowFirstReward();
|
||||
GameHelper.IsShowPettyReward();
|
||||
GameHelper.ShowStatementView();
|
||||
|
||||
|
||||
isClosed = false;
|
||||
|
||||
@@ -187,64 +191,191 @@ namespace ChillConnect
|
||||
|
||||
void CreateGoldtimeList()
|
||||
{
|
||||
// 获取保存对象
|
||||
var saveObject = SaveData.GetSaveObject();
|
||||
|
||||
// 检查_goldtime是否为null或者长度与Paidcoins_list.Count不相等
|
||||
|
||||
if (saveObject == null)
|
||||
{
|
||||
Debug.LogError("[CreateGoldtimeList] SaveData.GetSaveObject() returned null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Paidcoins_list == null || Paidcoins_list.Count == 0)
|
||||
{
|
||||
Debug.LogError("[CreateGoldtimeList] Paidcoins_list is null or empty");
|
||||
return;
|
||||
}
|
||||
|
||||
int goldtimeLength = saveObject._goldtime != null ? saveObject._goldtime.Length : 0;
|
||||
Debug.Log($"barry Paidcoins_list======{Paidcoins_list.Count} {goldtimeLength}");
|
||||
|
||||
if (saveObject._goldtime == null || saveObject._goldtime.Length != Paidcoins_list.Count)
|
||||
{
|
||||
// 重置_goldtime,并创建一个新的数组,长度为Paidcoins_list.Count
|
||||
saveObject._goldtime = new int[Paidcoins_list.Count];
|
||||
Debug.Log($"[CreateGoldtimeList] Initialized _goldtime with length: {Paidcoins_list.Count}");
|
||||
}
|
||||
|
||||
Debug.Log($"barry GetSaveObject._goldtime.Length======{saveObject._goldtime.Length}");
|
||||
}
|
||||
|
||||
private void UpBtnCoin()
|
||||
{
|
||||
int time = SaveData.GetSaveObject()._goldtime[0];
|
||||
var saveObject = SaveData.GetSaveObject();
|
||||
if (saveObject == null)
|
||||
{
|
||||
Debug.LogError("[UpBtnCoin] SaveData.GetSaveObject() returned null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (saveObject._goldtime == null)
|
||||
{
|
||||
Debug.LogError("[UpBtnCoin] saveObject._goldtime is null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (saveObject._goldtime.Length == 0)
|
||||
{
|
||||
Debug.LogError("[UpBtnCoin] saveObject._goldtime length is 0");
|
||||
return;
|
||||
}
|
||||
|
||||
int time = saveObject._goldtime[0];
|
||||
// Debug.Log($"[UpBtnCoin] time value: {time}, _goldtime length: {saveObject._goldtime.Length}");
|
||||
|
||||
if (ui.btn_gold == null)
|
||||
{
|
||||
Debug.LogError("[UpBtnCoin] ui.btn_gold is null");
|
||||
return;
|
||||
}
|
||||
|
||||
com_gold btn_gold = ui.btn_gold as com_gold;
|
||||
if (btn_gold == null)
|
||||
{
|
||||
Debug.LogError("[UpBtnCoin] ui.btn_gold cast to com_gold failed");
|
||||
return;
|
||||
}
|
||||
|
||||
if (btn_gold.state == null)
|
||||
{
|
||||
Debug.LogError("[UpBtnCoin] btn_gold.state is null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Paidcoins_list == null)
|
||||
{
|
||||
Debug.LogError("[UpBtnCoin] Paidcoins_list is null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Paidcoins_list.Count == 0)
|
||||
{
|
||||
Debug.LogError("[UpBtnCoin] Paidcoins_list count is 0");
|
||||
return;
|
||||
}
|
||||
|
||||
// Debug.Log($"[UpBtnCoin] Paidcoins_list count: {Paidcoins_list.Count}, receive_CD: {Paidcoins_list[0].receive_CD}");
|
||||
|
||||
if (time + Paidcoins_list[0].receive_CD < GameHelper.GetNowTime())
|
||||
{
|
||||
btn_gold.state.selectedIndex = 2;
|
||||
ui.btn_shop.red.visible = true;
|
||||
if (ui.btn_shop != null && ui.btn_shop.red != null)
|
||||
{
|
||||
ui.btn_shop.red.visible = true;
|
||||
// Debug.Log("[UpBtnCoin] Set btn_shop.red.visible = true");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
btn_gold.state.selectedIndex = 1;
|
||||
ui.btn_shop.red.visible = false;
|
||||
if (ui.btn_shop != null && ui.btn_shop.red != null)
|
||||
{
|
||||
ui.btn_shop.red.visible = false;
|
||||
}
|
||||
}
|
||||
checkThreeGift();
|
||||
|
||||
time_count++;
|
||||
ui.btn_sign.red.visible = signRed();
|
||||
|
||||
if (ui.btn_sign != null && ui.btn_sign.red != null)
|
||||
{
|
||||
ui.btn_sign.red.visible = signRed();
|
||||
}
|
||||
|
||||
if (!GameHelper.IsGiftSwitch())
|
||||
{
|
||||
// Debug.Log("[UpBtnCoin] Gift switch is disabled, returning early");
|
||||
return;
|
||||
}
|
||||
|
||||
if (DataMgr.MakeupTaskHistory.Value == null)
|
||||
{
|
||||
// Debug.LogError("[UpBtnCoin] DataMgr.MakeupTaskHistory.Value is null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (DataMgr.MakeupTaskHistory.Value.Count < 1)
|
||||
{
|
||||
// Debug.LogWarning("[UpBtnCoin] MakeupTaskHistory count is less than 1");
|
||||
return;
|
||||
}
|
||||
|
||||
MakeupTaskData data = DataMgr.MakeupTaskHistory.Value[DataMgr.MakeupTaskHistory.Value.Count - 1];
|
||||
if (data == null)
|
||||
{
|
||||
// Debug.LogError("[UpBtnCoin] MakeupTaskData is null");
|
||||
return;
|
||||
}
|
||||
|
||||
// Debug.Log($"[UpBtnCoin] MakeupTaskData status: {data.status}, ch_time: {data.ch_time}");
|
||||
|
||||
if (data.status != MakeupTaskStatus.Level)
|
||||
{
|
||||
(ui.btn_money as com_money).group_tips.visible = false;
|
||||
var btnMoney = ui.btn_money as com_money;
|
||||
if (btnMoney != null && btnMoney.group_tips != null)
|
||||
{
|
||||
btnMoney.group_tips.visible = false;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.ch_time > GameHelper.GetNowTime())
|
||||
{
|
||||
(ui.btn_money as com_money).text_time.text = "Only " + CommonHelper.TimeFormat((int)data.ch_time - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
var btnMoney = ui.btn_money as com_money;
|
||||
if (btnMoney != null && btnMoney.text_time != null)
|
||||
{
|
||||
btnMoney.text_time.text = "Only " + CommonHelper.TimeFormat((int)data.ch_time - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
// Debug.Log($"[UpBtnCoin] Updated text_time with remaining time");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
(ui.btn_money as com_money).group_tips.visible = false;
|
||||
var btnMoney = ui.btn_money as com_money;
|
||||
if (btnMoney != null && btnMoney.group_tips != null)
|
||||
{
|
||||
btnMoney.group_tips.visible = false;
|
||||
// Debug.Log("[UpBtnCoin] ch_time expired, hide group_tips");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
time_number++;
|
||||
if (time_number > 15)
|
||||
// Debug.Log($"[UpBtnCoin] time_number: {time_number}");
|
||||
|
||||
var btnMoney2 = ui.btn_money as com_money;
|
||||
if (btnMoney2 != null && btnMoney2.group_tips != null)
|
||||
{
|
||||
(ui.btn_money as com_money).group_tips.visible = true;
|
||||
}
|
||||
if (time_number > 20)
|
||||
{
|
||||
(ui.btn_money as com_money).group_tips.visible = false;
|
||||
time_number = 0;
|
||||
if (time_number > 15)
|
||||
{
|
||||
btnMoney2.group_tips.visible = true;
|
||||
// Debug.Log("[UpBtnCoin] time_number > 15, show group_tips");
|
||||
}
|
||||
if (time_number > 20)
|
||||
{
|
||||
btnMoney2.group_tips.visible = false;
|
||||
time_number = 0;
|
||||
// Debug.Log("[UpBtnCoin] time_number > 20, hide group_tips and reset counter");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int time_number = 0;
|
||||
|
||||
void OnRefreshMakeupData(object obj)
|
||||
@@ -324,37 +455,59 @@ namespace ChillConnect
|
||||
{
|
||||
uiCtrlDispatcher.Dispatch(UICtrlMsg.SaveingPotUI_Open);
|
||||
});
|
||||
|
||||
btn_noads.SetClick(() =>
|
||||
|
||||
ui.btn_statement.visible = GameHelper.IsGiftSwitch();
|
||||
ui.btn_statement.SetClick(() =>
|
||||
{
|
||||
if (!SaveData.GetSaveObject().is_get_packreward && !SaveData.GetSaveObject().is_get_removead)
|
||||
{
|
||||
if (btn_noads.GetChild("img_ad").visible)
|
||||
{
|
||||
PackRewardData param = new PackRewardData();
|
||||
param.isAutoPop = false;
|
||||
param.isNeedScroll = true;
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open, param);
|
||||
}
|
||||
else
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open);
|
||||
}
|
||||
|
||||
}
|
||||
else if (SaveData.GetSaveObject().is_get_packreward)
|
||||
{
|
||||
PackRewardData param = new PackRewardData();
|
||||
param.isAutoPop = false;
|
||||
param.isNeedScroll = true;
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open, param);
|
||||
}
|
||||
else
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open);
|
||||
}
|
||||
GameHelper.showGameUI = false;
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.StatementViewUI_Open);
|
||||
});
|
||||
|
||||
ui.btn_petty.visible = GameHelper.IsGiftSwitch();
|
||||
ui.btn_petty.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PettyAwardUI_Open);
|
||||
});
|
||||
|
||||
if (!GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().WVswitch == 0)
|
||||
{
|
||||
ui.btn_wv.visible = false;
|
||||
}
|
||||
|
||||
ui.btn_wv.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Open);
|
||||
});
|
||||
|
||||
// btn_noads.SetClick(() =>
|
||||
// {
|
||||
// if (!SaveData.GetSaveObject().is_get_packreward && !SaveData.GetSaveObject().is_get_removead)
|
||||
// {
|
||||
// if (btn_noads.GetChild("img_ad").visible)
|
||||
// {
|
||||
// PackRewardData param = new PackRewardData();
|
||||
// param.isAutoPop = false;
|
||||
// param.isNeedScroll = true;
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open, param);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// else if (SaveData.GetSaveObject().is_get_packreward)
|
||||
// {
|
||||
// PackRewardData param = new PackRewardData();
|
||||
// param.isAutoPop = false;
|
||||
// param.isNeedScroll = true;
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open, param);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open);
|
||||
// }
|
||||
// GameHelper.showGameUI = false;
|
||||
// });
|
||||
|
||||
if (ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1 && GameHelper.IsGiftSwitch())
|
||||
{
|
||||
@@ -385,17 +538,17 @@ namespace ChillConnect
|
||||
}
|
||||
}
|
||||
|
||||
checkThreeGift();
|
||||
ui.btn_failpack.SetClick(() =>
|
||||
{
|
||||
float progress = showResurgence();
|
||||
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ResurgenceUI_Open, progress);
|
||||
});
|
||||
// checkThreeGift();
|
||||
// ui.btn_failpack.SetClick(() =>
|
||||
// {
|
||||
// float progress = showResurgence();
|
||||
//
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ResurgenceUI_Open, progress);
|
||||
// });
|
||||
|
||||
ui.btn_three_day.SetClick(() =>
|
||||
{
|
||||
uiCtrlDispatcher.Dispatch(UICtrlMsg.ThreeDaysGiftUI_Open);
|
||||
// uiCtrlDispatcher.Dispatch(UICtrlMsg.ThreeDaysGiftUI_Open);
|
||||
});
|
||||
|
||||
ui.btn_battle.SetClick(() =>
|
||||
@@ -405,7 +558,7 @@ namespace ChillConnect
|
||||
|
||||
ui.btn_faq.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.FAQUI_Open);
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.FAQUI_Open);
|
||||
});
|
||||
ui.btn_rank.SetClick(() =>
|
||||
{
|
||||
@@ -432,16 +585,16 @@ namespace ChillConnect
|
||||
ui.btn_task.SetClick(() => { OnClickTask(false); });
|
||||
ui.btn_start.SetClick(() =>
|
||||
{
|
||||
if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveObject().have_slot && (DateTime.Now.Day != PlayerPrefs.GetInt("off_new", 0)))
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddviewnewUI_Open);
|
||||
PlayerPrefs.SetInt("off_new", DateTime.Now.Day);
|
||||
}
|
||||
else if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveObject().have_slot && UnityEngine.Random.Range(0, 100) < ConfigSystem.GetConfig<CommonModel>().BonusInside)
|
||||
{
|
||||
uiCtrlDispatcher.Dispatch(UICtrlMsg.AddviewnewUI_Open);
|
||||
}
|
||||
else
|
||||
// if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveObject().have_slot && (DateTime.Now.Day != PlayerPrefs.GetInt("off_new", 0)))
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddviewnewUI_Open);
|
||||
// PlayerPrefs.SetInt("off_new", DateTime.Now.Day);
|
||||
// }
|
||||
// else if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveObject().have_slot && UnityEngine.Random.Range(0, 100) < ConfigSystem.GetConfig<CommonModel>().BonusInside)
|
||||
// {
|
||||
// uiCtrlDispatcher.Dispatch(UICtrlMsg.AddviewnewUI_Open);
|
||||
// }
|
||||
// else
|
||||
OnClickPlay();
|
||||
});
|
||||
ui.btn_setting.SetClick(() =>
|
||||
@@ -481,16 +634,16 @@ namespace ChillConnect
|
||||
btn_play_list[i].state.selectedIndex = 1;
|
||||
btn_play_list[i].SetClick(() =>
|
||||
{
|
||||
if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveObject().have_slot && (DateTime.Now.Day != PlayerPrefs.GetInt("off_new", 0)))
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddviewnewUI_Open);
|
||||
PlayerPrefs.SetInt("off_new", DateTime.Now.Day);
|
||||
}
|
||||
else if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveObject().have_slot && UnityEngine.Random.Range(0, 100) < ConfigSystem.GetConfig<CommonModel>().BonusInside)
|
||||
{
|
||||
uiCtrlDispatcher.Dispatch(UICtrlMsg.AddviewnewUI_Open);
|
||||
}
|
||||
else
|
||||
// if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveObject().have_slot && (DateTime.Now.Day != PlayerPrefs.GetInt("off_new", 0)))
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddviewnewUI_Open);
|
||||
// PlayerPrefs.SetInt("off_new", DateTime.Now.Day);
|
||||
// }
|
||||
// else if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveObject().have_slot && UnityEngine.Random.Range(0, 100) < ConfigSystem.GetConfig<CommonModel>().BonusInside)
|
||||
// {
|
||||
// uiCtrlDispatcher.Dispatch(UICtrlMsg.AddviewnewUI_Open);
|
||||
// }
|
||||
// else
|
||||
OnClickPlay();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Dont_Confuse;
|
||||
using IgnoreOPS;
|
||||
using IgnoreOPS;
|
||||
using FairyGUI;
|
||||
using FGUI.Common_01;
|
||||
@@ -54,7 +54,8 @@ namespace ChillConnect
|
||||
HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn;
|
||||
|
||||
GameHelper.showGameUI = true;
|
||||
WebviewManager.ShezhiACT(true);
|
||||
// WebviewManager.ShezhiACT(true);
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
|
||||
gameDispatcher.Dispatch(GameMsg.MakeUpConfirmUIClosed);
|
||||
|
||||
@@ -62,7 +63,7 @@ namespace ChillConnect
|
||||
{
|
||||
if (UnityEngine.Random.Range(0, 50) < 25)
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.FAQUI_Open);
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.FAQUI_Open);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -87,7 +88,8 @@ namespace ChillConnect
|
||||
DataMgr.MakeupTaskH5Time.Value = 999999999;
|
||||
// DataMgr.Ticket.Value = 999999999; //zhushi
|
||||
|
||||
WebviewManager.ShezhiACT(false);
|
||||
WebviewManager.Instance.SetDarkThough(false);
|
||||
// WebviewManager.ShezhiACT(false);
|
||||
|
||||
makeupTaskData = args as MakeupTaskData;
|
||||
ch_index = makeupTaskData.tableId - 1;
|
||||
@@ -647,6 +649,8 @@ namespace ChillConnect
|
||||
AudioManager.Instance.PlayDynamicEffect(AudioConst.MakeupDone);
|
||||
makeupTaskData.SetStatus(MakeupTaskStatus.Task);
|
||||
DataMgr.MakeupTaskHistory.Save();
|
||||
DataMgr.Ticket.Value -= vo.item_need;
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Update102);
|
||||
// OnTask();
|
||||
InitView();
|
||||
});
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace ChillConnect
|
||||
protected override void OnClose()
|
||||
{
|
||||
CommonHelper.FadeOut(ui);
|
||||
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
@@ -67,6 +67,7 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
WebviewManager.Instance.SetDarkThough(false);
|
||||
CommonHelper.FadeIn(ui);
|
||||
|
||||
// if (args != null)
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace ChillConnect
|
||||
int three_gift_got_index = SaveData.GetSaveObject().three_gift_got_index;
|
||||
if (isAutoPop && (three_gift_got_index <= (int)rewardState.day3))
|
||||
{
|
||||
uiCtrlDispatcher.Dispatch(UICtrlMsg.ThreeDaysGiftUI_Open);
|
||||
// uiCtrlDispatcher.Dispatch(UICtrlMsg.ThreeDaysGiftUI_Open);
|
||||
}
|
||||
GameHelper.CallShowTurn();
|
||||
}
|
||||
@@ -80,6 +80,8 @@ namespace ChillConnect
|
||||
ConfigSystem.GetConfig<PaidgiftModel>().DataList[1].Paid_price = 1;
|
||||
}
|
||||
|
||||
ui.panel_parent.panel.gift.selectedIndex = GameHelper.IsGiftSwitch() ? 1 : 0;
|
||||
|
||||
bool need_scroll = false;
|
||||
|
||||
PackRewardData Datas = args as PackRewardData;
|
||||
@@ -347,8 +349,8 @@ namespace ChillConnect
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log(AdRedeemManager.Instance.GetLookRewardADNum());
|
||||
Debug.Log(ConfigSystem.GetConfig<PaidgiftModel>().DataList[0].Paid_price);
|
||||
// Debug.Log(AdRedeemManager.Instance.GetLookRewardADNum());
|
||||
// Debug.Log(ConfigSystem.GetConfig<PaidgiftModel>().DataList[0].Paid_price);
|
||||
if (AdRedeemManager.Instance.GetLookRewardADNum() >= ConfigSystem.GetConfig<PaidgiftModel>().DataList[0].Paid_price)
|
||||
{
|
||||
(ui.panel_parent.panel.btn_buypack as btn_watchAd).enabled = true;
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
GameHelper.showGameUI = true;
|
||||
HallManager.Instance.UpdateSecondEvent -= upData;
|
||||
|
||||
@@ -57,6 +58,7 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
WebviewManager.Instance.SetDarkThough(false);
|
||||
if (Screen.safeArea.y != 0)
|
||||
{
|
||||
// ui.bg.y += 68;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Dont_Confuse;
|
||||
using IgnoreOPS;
|
||||
using FairyGUI;
|
||||
using FGUI.Setting_07;
|
||||
using IgnoreOPS;
|
||||
@@ -45,7 +45,8 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
WebviewManager.ShezhiACT(true);
|
||||
// WebviewManager.ShezhiACT(true);
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
@@ -60,7 +61,7 @@ namespace ChillConnect
|
||||
// {
|
||||
// ui.title.y += Screen.safeArea.y;
|
||||
// }
|
||||
WebviewManager.ShezhiACT(false);
|
||||
// WebviewManager.ShezhiACT(false);
|
||||
_selectIndex = DataMgr.PlayerAvatarId.Value;
|
||||
|
||||
InitView();
|
||||
@@ -69,6 +70,7 @@ namespace ChillConnect
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
// CommonHelper.FadeIn(ui);
|
||||
WebviewManager.Instance.SetDarkThough(false);
|
||||
ui.show.Play();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c7afed3bc6e245aaba4279f3747e8ca2
|
||||
timeCreated: 1780552707
|
||||
@@ -0,0 +1,42 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class PettyAwardCtrl : BaseCtrl
|
||||
{
|
||||
public static PettyAwardCtrl Instance { get; private set; }
|
||||
|
||||
private PettyAwardModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.PettyAwardModel) as PettyAwardModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1261358ce7a049afb16f4553810bd5bf
|
||||
timeCreated: 1766046260
|
||||
@@ -0,0 +1,43 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class PettyAwardModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
// protected override void OnReset()
|
||||
// {
|
||||
// }
|
||||
// #endregion
|
||||
|
||||
// #region 读取数据
|
||||
// protected override void OnReadData()
|
||||
// {
|
||||
// }
|
||||
// #endregion
|
||||
|
||||
// #region 本地存储
|
||||
// protected override void WriteLocalStorage()
|
||||
// {
|
||||
|
||||
// }
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92b7e778079e4302b93e51da320ec76c
|
||||
timeCreated: 1766046260
|
||||
@@ -0,0 +1,300 @@
|
||||
using System;
|
||||
using IgnoreOPS;
|
||||
using UnityEngine;
|
||||
using Spine.Unity;
|
||||
using Newtonsoft.Json;
|
||||
using SGModule.NetKit;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class PettyAwardUI : BaseUI
|
||||
{
|
||||
private PettyAwardUICtrl ctrl;
|
||||
private PettyAwardModel model;
|
||||
private FGUI.ZM_Petty.com_petty_award ui;
|
||||
private Action closeCallback;
|
||||
private Action open_sign;
|
||||
private bool is_get = false;
|
||||
public PettyAwardUI(PettyAwardUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.PettyAwardUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "ZM_Petty";
|
||||
uiInfo.assetName = "com_petty_award";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
model = ModuleManager.Instance.GetModel(ModelConst.PettyAwardModel) as PettyAwardModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
closeCallback?.Invoke();
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.ZM_Petty.com_petty_award;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
|
||||
InitView();
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
//open_sign = (System.Action)args;
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDisplay(object args)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
private int _mLastState;
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
_mLastState = 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";
|
||||
|
||||
|
||||
ui.com_get_panel.btn_get.SetClick(GotoEnterAccount);
|
||||
ui.btn_close.SetClick(()=>
|
||||
{
|
||||
if (ui.state.selectedIndex == 4)
|
||||
{
|
||||
GotoEnterAccount();
|
||||
}
|
||||
else
|
||||
{
|
||||
CtrlCloseUI();
|
||||
}
|
||||
});
|
||||
|
||||
if (_mLastState == 0)
|
||||
{
|
||||
var sk = FXManager.Instance.SetFx<SkeletonAnimation>(ui.anim, Fx_Type.fx_petty_reward, ref closeCallback);
|
||||
sk.state.SetAnimation(0, "newbie_reward_an01", false);
|
||||
sk.state.Complete += (a) =>
|
||||
{
|
||||
sk.state.SetAnimation(0, "newbie_reward_an02", true);
|
||||
ui.btn_gerAward.SetClick(() =>
|
||||
{
|
||||
ui.btn_gerAward.visible = false;
|
||||
sk.state.SetAnimation(0, "newbie_reward_an03", false);
|
||||
sk.state.Complete += (a) =>
|
||||
{
|
||||
ui.state.selectedIndex = 1;
|
||||
SaveData.GetSaveObject().PettyState = 1;
|
||||
ui.anim.visible = false;
|
||||
};
|
||||
});
|
||||
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
GotoPanel(_mLastState);
|
||||
}
|
||||
}
|
||||
|
||||
private void GotoPanel(int index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 1:
|
||||
ui.state.selectedIndex = 1;
|
||||
break;
|
||||
case 2:
|
||||
ui.state.selectedIndex = 2;
|
||||
GotoEnterAccount();
|
||||
break;
|
||||
case 3:
|
||||
ui.state.selectedIndex = 3;
|
||||
GotoDetail();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void GotoEnterAccount()
|
||||
{
|
||||
ui.state.selectedIndex = 2;
|
||||
SaveData.GetSaveObject().PettyState = 2;
|
||||
if (!SaveData.GetSaveObject().PettyAccount.IsNullOrWhiteSpace())
|
||||
{
|
||||
ui.com_account.com_email.enter_email.text = SaveData.GetSaveObject().PettyAccount;
|
||||
}
|
||||
if (!SaveData.GetSaveObject().PettyFirstName.IsNullOrWhiteSpace())
|
||||
{
|
||||
ui.com_account.com_first_name.enter_first_name.text = SaveData.GetSaveObject().PettyFirstName;
|
||||
}
|
||||
if (!SaveData.GetSaveObject().PettyLastName.IsNullOrWhiteSpace())
|
||||
{
|
||||
ui.com_account.com_last_name.enter_last_name.text = SaveData.GetSaveObject().PettyLastName;
|
||||
}
|
||||
|
||||
ui.com_account.btn_confirm.SetClick(ConfirmClick);
|
||||
}
|
||||
|
||||
private void ConfirmClick()
|
||||
{
|
||||
var account = ui.com_account.com_email.enter_email.text.Replace(" ", "");
|
||||
if (account == "")
|
||||
{
|
||||
GameHelper.ShowTips("Please enter the correct account information", true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!GameHelper.CheckAccountValidly(account))
|
||||
{
|
||||
GameHelper.ShowTips("Please enter the correct account information", true);
|
||||
return;
|
||||
}
|
||||
|
||||
var fname = ui.com_account.com_first_name.enter_first_name.text.Replace(" ", "");
|
||||
if (!GameHelper.CheckNameValidly(fname))
|
||||
{
|
||||
GameHelper.ShowTips("Please enter the correct account information", true);
|
||||
return;
|
||||
}
|
||||
|
||||
var lname = ui.com_account.com_last_name.enter_last_name.text.Replace(" ", "");
|
||||
if (!GameHelper.CheckNameValidly(lname) && !AppConst.isPt())
|
||||
{
|
||||
GameHelper.ShowTips("Please enter the correct account information", true);
|
||||
return;
|
||||
}
|
||||
|
||||
SaveData.GetSaveObject().PettyAccount = account;
|
||||
SaveData.GetSaveObject().PettyFirstName = fname;
|
||||
SaveData.GetSaveObject().PettyLastName = lname;
|
||||
|
||||
GotoSecondConfirm(account, fname, lname);
|
||||
|
||||
}
|
||||
|
||||
private void GotoSecondConfirm( string account, string fname, string lname)
|
||||
{
|
||||
ui.state.selectedIndex = 4;
|
||||
PaymentMsg info = new PaymentMsg
|
||||
{
|
||||
email = account,
|
||||
first_name = fname,
|
||||
last_name = lname
|
||||
};
|
||||
|
||||
ui.com_second_confirm.text_account.SetVar("account", account).FlushVars();
|
||||
ui.com_second_confirm.text_first_name.SetVar("name", fname).FlushVars();
|
||||
ui.com_second_confirm.text_last_name.SetVar("name", lname).FlushVars();
|
||||
|
||||
ui.com_second_confirm.btn_confirm.SetClick(() =>
|
||||
{
|
||||
ui.com_second_confirm.btn_confirm.enabled = false;
|
||||
|
||||
NetApi.PayOutUserInfo<OrderState>(account,
|
||||
fname, lname, (isSuccess, obj) =>
|
||||
{
|
||||
if (isSuccess)
|
||||
{
|
||||
GotoDetail();
|
||||
}
|
||||
else
|
||||
{
|
||||
GameHelper.ShowTips("Failed to save information., please try again");
|
||||
ui.com_second_confirm.btn_confirm.enabled = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private void GotoDetail()
|
||||
{
|
||||
ui.state.selectedIndex = 3;
|
||||
SaveData.GetSaveObject().PettyState = 3;
|
||||
|
||||
var pettyAmount = SaveData.GetSaveObject().PettyAmount;
|
||||
if (pettyAmount != 0)
|
||||
{
|
||||
ui.com_detail.text_amount.SetVar("num", GameHelper.Get102Str(pettyAmount)).FlushVars();
|
||||
}
|
||||
else
|
||||
{
|
||||
var num = GameHelper.GetCommonModel().SmallReward;
|
||||
ui.com_detail.text_amount.SetVar("num", GameHelper.Get102Str(num)).FlushVars();
|
||||
SaveData.GetSaveObject().PettyAmount = num;
|
||||
}
|
||||
|
||||
var pettyDateTime = SaveData.GetSaveObject().PettyDateTime;
|
||||
if (!pettyDateTime.IsNullOrWhiteSpace())
|
||||
{
|
||||
ui.com_detail.text_data.SetVar("data", pettyDateTime).FlushVars();
|
||||
}
|
||||
else
|
||||
{
|
||||
var dateTime = DateTime.Now.ToString("yyyy.MM.dd");
|
||||
ui.com_detail.text_data.SetVar("data",dateTime).FlushVars();
|
||||
SaveData.GetSaveObject().PettyDateTime = dateTime;
|
||||
}
|
||||
|
||||
var pettyOrderID = SaveData.GetSaveObject().PettyOrderID;
|
||||
if (!pettyOrderID.IsNullOrWhiteSpace())
|
||||
{
|
||||
ui.com_detail.text_order.SetVar("order", pettyOrderID).FlushVars();
|
||||
}
|
||||
else
|
||||
{
|
||||
string datePart = DateTime.Now.ToString("yyyyMMdd");
|
||||
System.Random random = new System.Random();
|
||||
string randomPart = random.Next(1000, 9999).ToString(); // 生成1000-9999之间的四位数
|
||||
ui.com_detail.text_order.SetVar("order",datePart + randomPart).FlushVars();
|
||||
|
||||
SaveData.GetSaveObject().PettyOrderID = datePart + randomPart;
|
||||
}
|
||||
|
||||
|
||||
ui.com_detail.text_email.SetVar("email",SaveData.GetSaveObject().PettyAccount).FlushVars();
|
||||
|
||||
var pettyDataLimit = SaveData.GetSaveObject().PettyDataLimit;
|
||||
if (pettyDataLimit != 0)
|
||||
{
|
||||
ui.com_detail.text_limit.SetVar("day", pettyDataLimit.ToString()).FlushVars();
|
||||
}else
|
||||
{
|
||||
var day = GameHelper.GetCommonModel().ProcessingTime;
|
||||
ui.com_detail.text_limit.SetVar("day", day.ToString()).FlushVars();
|
||||
SaveData.GetSaveObject().PettyDataLimit = day;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3976c01df34446138c677b09d9acbe64
|
||||
timeCreated: 1766046260
|
||||
@@ -0,0 +1,71 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class PettyAwardUICtrl : BaseUICtrl
|
||||
{
|
||||
private PettyAwardUI ui;
|
||||
private PettyAwardModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.PettyAwardUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.PettyAwardUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.PettyAwardModel) as PettyAwardModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new PettyAwardUI(this);
|
||||
ui.Open(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8acb71d41fef451383c9046c42ba7a9d
|
||||
timeCreated: 1766046260
|
||||
@@ -160,7 +160,7 @@ namespace ChillConnect
|
||||
|
||||
}
|
||||
|
||||
|
||||
ui.btn_money.visible = false;
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
{
|
||||
ui.btn_money.visible = true;
|
||||
@@ -170,6 +170,9 @@ namespace ChillConnect
|
||||
anim_paly.state.SetAnimation(0, "animation", true);
|
||||
|
||||
GameHelper.IsShowFirstReward();
|
||||
GameHelper.IsShowPettyReward();
|
||||
GameHelper.ShowStatementView();
|
||||
|
||||
|
||||
CreateGoldtimeList();
|
||||
|
||||
@@ -244,36 +247,36 @@ namespace ChillConnect
|
||||
GameHelper.SetGameday();
|
||||
}
|
||||
|
||||
ui.btn_noads.SetClick(() =>
|
||||
{
|
||||
if (!SaveData.GetSaveObject().is_get_packreward && !SaveData.GetSaveObject().is_get_removead)
|
||||
{
|
||||
if (ui.btn_noads.GetChild("img_ad").visible)
|
||||
{
|
||||
PackRewardData param = new PackRewardData();
|
||||
param.isAutoPop = false;
|
||||
param.isNeedScroll = true;
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open, param);
|
||||
}
|
||||
else
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open);
|
||||
}
|
||||
|
||||
}
|
||||
else if (SaveData.GetSaveObject().is_get_packreward)
|
||||
{
|
||||
PackRewardData param = new PackRewardData();
|
||||
param.isAutoPop = false;
|
||||
param.isNeedScroll = true;
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open, param);
|
||||
}
|
||||
else
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open);
|
||||
}
|
||||
GameHelper.showGameUI = false;
|
||||
});
|
||||
// ui.btn_noads.SetClick(() =>
|
||||
// {
|
||||
// if (!SaveData.GetSaveObject().is_get_packreward && !SaveData.GetSaveObject().is_get_removead)
|
||||
// {
|
||||
// if (ui.btn_noads.GetChild("img_ad").visible)
|
||||
// {
|
||||
// PackRewardData param = new PackRewardData();
|
||||
// param.isAutoPop = false;
|
||||
// param.isNeedScroll = true;
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open, param);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// else if (SaveData.GetSaveObject().is_get_packreward)
|
||||
// {
|
||||
// PackRewardData param = new PackRewardData();
|
||||
// param.isAutoPop = false;
|
||||
// param.isNeedScroll = true;
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open, param);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open);
|
||||
// }
|
||||
// GameHelper.showGameUI = false;
|
||||
// });
|
||||
|
||||
SetLevelProgress();
|
||||
(ui.btn_money as com_money).btn_ch.title = GameHelper.getDesByKey("ch_out_1");
|
||||
@@ -282,76 +285,156 @@ namespace ChillConnect
|
||||
|
||||
void timeEvent()
|
||||
{
|
||||
if (SaveData.GetSaveObject().addview_off_time > GameHelper.GetNowTime() && GameHelper.IsGiftSwitch())
|
||||
var saveObject = SaveData.GetSaveObject();
|
||||
if (saveObject == null)
|
||||
{
|
||||
if (!effect_show)
|
||||
ui.btn_add.type.selectedIndex = 1;
|
||||
ui.btn_add.type.selectedIndex = 1;
|
||||
ui.btn_add.text_offtime.text = CommonHelper.TimeFormat(SaveData.GetSaveObject().addview_off_time - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
Debug.LogError("[RainPlayUI UpBtnCoin] SaveData.GetSaveObject() returned null");
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
||||
if (saveObject._goldtime == null)
|
||||
{
|
||||
ui.btn_add.type.selectedIndex = 0;
|
||||
Debug.LogError("[RainPlayUI UpBtnCoin] saveObject._goldtime is null");
|
||||
return;
|
||||
}
|
||||
|
||||
int time = SaveData.GetSaveObject()._goldtime[0];
|
||||
|
||||
if (saveObject._goldtime.Length == 0)
|
||||
{
|
||||
Debug.LogError("[RainPlayUI UpBtnCoin] saveObject._goldtime length is 0");
|
||||
return;
|
||||
}
|
||||
|
||||
int time = saveObject._goldtime[0];
|
||||
|
||||
if (ui.btn_gold == null)
|
||||
{
|
||||
Debug.LogError("[RainPlayUI UpBtnCoin] ui.btn_gold is null");
|
||||
return;
|
||||
}
|
||||
|
||||
com_gold btn_gold = ui.btn_gold as com_gold;
|
||||
if (btn_gold == null)
|
||||
{
|
||||
Debug.LogError("[RainPlayUI UpBtnCoin] ui.btn_gold cast to com_gold failed");
|
||||
return;
|
||||
}
|
||||
|
||||
if (btn_gold.state == null)
|
||||
{
|
||||
Debug.LogError("[RainPlayUI UpBtnCoin] btn_gold.state is null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Paidcoins_list == null)
|
||||
{
|
||||
Debug.LogError("[RainPlayUI UpBtnCoin] Paidcoins_list is null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Paidcoins_list.Count == 0)
|
||||
{
|
||||
Debug.LogError("[RainPlayUI UpBtnCoin] Paidcoins_list count is 0");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (time + Paidcoins_list[0].receive_CD < GameHelper.GetNowTime())
|
||||
{
|
||||
btn_gold.state.selectedIndex = 2;
|
||||
// btn_gold.red.visible = true;
|
||||
}
|
||||
else btn_gold.state.selectedIndex = 1;
|
||||
else
|
||||
{
|
||||
btn_gold.state.selectedIndex = 1;
|
||||
}
|
||||
|
||||
ui.btn_task_pass.GetChild("red").visible = SaveData.battlepassred();
|
||||
// ui.btn_task.red.visible = SaveData.getRed();
|
||||
if (!GameHelper.IsGiftSwitch()) return;
|
||||
if (ui.btn_task_pass != null && ui.btn_task_pass.GetChild("red") != null)
|
||||
{
|
||||
ui.btn_task_pass.GetChild("red").visible = SaveData.battlepassred();
|
||||
}
|
||||
|
||||
if (!GameHelper.IsGiftSwitch())
|
||||
{
|
||||
Debug.Log("[RainPlayUI UpBtnCoin] Gift switch is disabled, returning early");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
btn_look_ad_showtime++;
|
||||
if (btn_look_ad_showtime > 15) ui.btn_look_ad.visible = false;
|
||||
|
||||
if ((!SaveData.GetSaveObject().is_get_packreward || !SaveData.GetSaveObject().is_get_removead) && !SaveData.GetSaveObject().is_autopack_show
|
||||
&& (Time.time > (ConfigSystem.GetConfig<CommonModel>().Activetimes * 60)))
|
||||
if (btn_look_ad_showtime > 15)
|
||||
{
|
||||
Window Popup = GRoot.inst.GetChild("Popup") as Window;
|
||||
if (Popup.GetChildren().Length > 0) return;
|
||||
PackRewardData param = new PackRewardData();
|
||||
param.isAutoPop = true;
|
||||
param.isNeedScroll = false;
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open, param);
|
||||
SaveData.GetSaveObject().is_autopack_show = true;
|
||||
SaveData.GetSaveObject().is_autopack_show_day = DateTime.Now.Day;
|
||||
SaveData.saveDataFunc();
|
||||
|
||||
if (ui.btn_look_ad != null)
|
||||
{
|
||||
ui.btn_look_ad.visible = false;
|
||||
}
|
||||
}
|
||||
if (DataMgr.MakeupTaskHistory.Value.Count < 1)
|
||||
|
||||
if (DataMgr.MakeupTaskHistory.Value == null)
|
||||
{
|
||||
Debug.LogError("[RainPlayUI UpBtnCoin] DataMgr.MakeupTaskHistory.Value is null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (DataMgr.MakeupTaskHistory.Value.Count < 1)
|
||||
{
|
||||
Debug.LogWarning("[RainPlayUI UpBtnCoin] MakeupTaskHistory count is less than 1");
|
||||
return;
|
||||
}
|
||||
|
||||
MakeupTaskData data = DataMgr.MakeupTaskHistory.Value[DataMgr.MakeupTaskHistory.Value.Count - 1];
|
||||
if (data == null)
|
||||
{
|
||||
Debug.LogError("[RainPlayUI UpBtnCoin] MakeupTaskData is null");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (data.status != MakeupTaskStatus.Level)
|
||||
{
|
||||
(ui.btn_money as com_money).group_tips.visible = false;
|
||||
var btnMoney = ui.btn_money as com_money;
|
||||
if (btnMoney != null && btnMoney.group_tips != null)
|
||||
{
|
||||
btnMoney.group_tips.visible = false;
|
||||
// Debug.Log("[RainPlayUI UpBtnCoin] Status is not Level, hide group_tips");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.ch_time > GameHelper.GetNowTime())
|
||||
{
|
||||
(ui.btn_money as com_money).text_time.text = "Only " + CommonHelper.TimeFormat((int)data.ch_time - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
var btnMoney = ui.btn_money as com_money;
|
||||
if (btnMoney != null && btnMoney.text_time != null)
|
||||
{
|
||||
btnMoney.text_time.text = "Only " + CommonHelper.TimeFormat((int)data.ch_time - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
// Debug.Log($"[RainPlayUI UpBtnCoin] Updated text_time with remaining time");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
(ui.btn_money as com_money).group_tips.visible = false;
|
||||
var btnMoney = ui.btn_money as com_money;
|
||||
if (btnMoney != null && btnMoney.group_tips != null)
|
||||
{
|
||||
btnMoney.group_tips.visible = false;
|
||||
// Debug.Log("[RainPlayUI UpBtnCoin] ch_time expired, hide group_tips");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
time_number++;
|
||||
if (time_number > 15)
|
||||
|
||||
var btnMoney2 = ui.btn_money as com_money;
|
||||
if (btnMoney2 != null && btnMoney2.group_tips != null)
|
||||
{
|
||||
(ui.btn_money as com_money).group_tips.visible = true;
|
||||
}
|
||||
if (time_number > 20)
|
||||
{
|
||||
(ui.btn_money as com_money).group_tips.visible = false;
|
||||
time_number = 0;
|
||||
if (time_number > 15)
|
||||
{
|
||||
btnMoney2.group_tips.visible = true;
|
||||
// Debug.Log("[RainPlayUI UpBtnCoin] time_number > 15, show group_tips");
|
||||
}
|
||||
if (time_number > 20)
|
||||
{
|
||||
btnMoney2.group_tips.visible = false;
|
||||
time_number = 0;
|
||||
// Debug.Log("[RainPlayUI UpBtnCoin] time_number > 20, hide group_tips and reset counter");
|
||||
}
|
||||
}
|
||||
}
|
||||
private int time_number = 0;
|
||||
@@ -481,6 +564,7 @@ namespace ChillConnect
|
||||
GameDispatcher.Instance.AddListener(GameMsg.ThreeDaysGiftUIClose, checkThreeGift);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.noads_refresh, setBtnAds);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.add_points, AddPoints);
|
||||
|
||||
// MainThreadDispatcher.Instance.AddListener(MainThreadMsg.App_Focus_True, backGame);
|
||||
|
||||
}
|
||||
@@ -551,18 +635,18 @@ namespace ChillConnect
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SheepwindowUI_Open, 2);
|
||||
});
|
||||
|
||||
ui.btn_failpack.SetClick(() =>
|
||||
{
|
||||
float complte_progress = showResurgence();
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ResurgenceUI_Open, complte_progress);
|
||||
});
|
||||
|
||||
// ui.btn_failpack.SetClick(() =>
|
||||
// {
|
||||
// float complte_progress = showResurgence();
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ResurgenceUI_Open, complte_progress);
|
||||
// });
|
||||
|
||||
ui.btn_task_pass.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PassViewUI_Open); });
|
||||
|
||||
ui.btn_look_ad.SetClick(LookAd);
|
||||
ui.btn_three_day.SetClick(() =>
|
||||
{
|
||||
uiCtrlDispatcher.Dispatch(UICtrlMsg.ThreeDaysGiftUI_Open);
|
||||
// uiCtrlDispatcher.Dispatch(UICtrlMsg.ThreeDaysGiftUI_Open);
|
||||
});
|
||||
|
||||
if (ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1 && GameHelper.IsGiftSwitch())
|
||||
@@ -570,7 +654,22 @@ namespace ChillConnect
|
||||
ui.btn_saveingpot.visible = true;
|
||||
}
|
||||
ui.btn_saveingpot.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.SaveingPotUI_Open); });
|
||||
|
||||
|
||||
ui.btn_statement.visible = GameHelper.IsGiftSwitch();
|
||||
ui.btn_statement.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.StatementViewUI_Open);
|
||||
});
|
||||
|
||||
if (!GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().WVswitch == 0)
|
||||
{
|
||||
ui.btn_wv.visible = false;
|
||||
}
|
||||
|
||||
ui.btn_wv.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Open);
|
||||
});
|
||||
|
||||
// #if !UNITY_EDITOR
|
||||
// string type = SystemInfo.deviceModel.ToLower().Trim();
|
||||
@@ -585,22 +684,42 @@ namespace ChillConnect
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddViewoffUI_Open); return;//zhushi
|
||||
|
||||
// GameHelper.ShowTips("Coming Soon!");
|
||||
if (SaveData.GetSaveObject().addview_off_time > GameHelper.GetNowTime() && GameHelper.IsGiftSwitch())
|
||||
|
||||
if (DataMgr.NewWatchCd.Value[1] < Convert.ToInt32(GameHelper.GetNowTime()))
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddViewoffUI_Open);
|
||||
}
|
||||
else
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuyslotUI_Open);
|
||||
GameHelper.ShowVideoAd("reward_add_space", isSuccess =>
|
||||
{
|
||||
if (isSuccess)
|
||||
{
|
||||
SaveData.GetSaveObject().have_slot = true;
|
||||
SetSlotNumber();
|
||||
GameHelper.SetWatchCd(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
// if (SaveData.GetSaveObject().addview_off_time > GameHelper.GetNowTime() && GameHelper.IsGiftSwitch())
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddViewoffUI_Open);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuyslotUI_Open);
|
||||
// }
|
||||
GameHelper.showGameUI = false;
|
||||
});
|
||||
|
||||
ui.btn_petty.visible = GameHelper.IsGiftSwitch();
|
||||
ui.btn_petty.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PettyAwardUI_Open);
|
||||
});
|
||||
|
||||
SetItemNumber();
|
||||
SetSlotNumber();
|
||||
SetTopCurr();
|
||||
setBtnAds();
|
||||
|
||||
ui.btn_gold.visible = !GameHelper.IsGiftSwitch();
|
||||
ui.btn_gold.SetClick(() =>
|
||||
{
|
||||
//uiCtrlDispatcher.Dispatch(UICtrlMsg.MainUI_Open);
|
||||
@@ -663,7 +782,7 @@ namespace ChillConnect
|
||||
}
|
||||
RankSystemMgr.Instance.checkUsers();
|
||||
ui.btn_rank.visible = GameHelper.IsGiftSwitch();
|
||||
ui.btn_rank.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RankUI_Open); });
|
||||
// ui.btn_rank.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RankUI_Open); });
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
{
|
||||
var data = SaveData.GetRankData().rankRewardData;
|
||||
@@ -686,6 +805,12 @@ namespace ChillConnect
|
||||
// Debug.Log($"barry initView==== {SaveData.GetSaveObject().card_layer} {SaveData.GetSaveObject().all_card_numbers}");
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void OnClickPass()
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PassViewUI_Open);
|
||||
}
|
||||
|
||||
private void AddPoints(object a = null)
|
||||
{
|
||||
@@ -727,6 +852,8 @@ namespace ChillConnect
|
||||
|
||||
try
|
||||
{
|
||||
ui.btn_task_pass.GetChild("red").visible = SaveData.battlepassred();
|
||||
|
||||
ui.btn_rank.GetChild("red").visible = SaveData.GetRankData().rankRewardData.Count > 0;
|
||||
}
|
||||
catch
|
||||
@@ -813,6 +940,7 @@ namespace ChillConnect
|
||||
|
||||
void CreateGoldtimeList()
|
||||
{
|
||||
Debug.Log($"barry _goldtime======{Paidcoins_list.Count}");
|
||||
// 获取保存对象
|
||||
var saveObject = SaveData.GetSaveObject();
|
||||
|
||||
@@ -820,8 +948,10 @@ namespace ChillConnect
|
||||
if (saveObject._goldtime == null || saveObject._goldtime.Length != Paidcoins_list.Count)
|
||||
{
|
||||
// 重置_goldtime,并创建一个新的数组,长度为Paidcoins_list.Count
|
||||
saveObject._goldtime = new int[Paidcoins_list.Count];
|
||||
SaveData.GetSaveObject()._goldtime = new int[Paidcoins_list.Count];
|
||||
}
|
||||
Debug.Log($"barry GetSaveObject._goldtime.Length======{SaveData.GetSaveObject()._goldtime.Length}");
|
||||
|
||||
}
|
||||
|
||||
void LookAd()
|
||||
@@ -1033,12 +1163,14 @@ namespace ChillConnect
|
||||
RefreshCardState(true);
|
||||
GameHelper.SetLevelstate(3);
|
||||
GameHelper.IsTemporaryEnd = false;
|
||||
SaveData.GetSaveObject().have_slot = false;
|
||||
SaveData.GetSaveObject().clear_number = 0;
|
||||
for (int i = 0; i < SaveData.GetSaveObject().usePropsNum.Length; i++)
|
||||
{
|
||||
SaveData.GetSaveObject().usePropsNum[i] = 0;
|
||||
}
|
||||
// SetLevelProgress();
|
||||
SetSlotNumber();
|
||||
}
|
||||
void RefreshFunc()
|
||||
{
|
||||
@@ -1706,38 +1838,38 @@ namespace ChillConnect
|
||||
float complte_progress = showResurgence();
|
||||
if (GameHelper.GetLevelstate() != 0)
|
||||
{
|
||||
if (SaveData.GetSaveObject().game_fail_off_number >= ConfigSystem.GetConfig<CommonModel>().AddDiscountLevel && !is_showslot && !SaveData.GetSaveObject().have_slot && GameHelper.IsGiftSwitch())
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddViewoffUI_Open);
|
||||
SaveData.GetSaveObject().game_fail_off_number = 0;
|
||||
if (SaveData.GetSaveObject().addview_off_time < GameHelper.GetNowTime())
|
||||
{
|
||||
SaveData.GetSaveObject().addview_off_time = (int)GameHelper.GetNowTime() + ConfigSystem.GetConfig<CommonModel>().AddDiscountCD;
|
||||
}
|
||||
is_showslot = true;
|
||||
// if (SaveData.GetSaveObject().game_fail_off_number >= ConfigSystem.GetConfig<CommonModel>().AddDiscountLevel && !is_showslot && !SaveData.GetSaveObject().have_slot && GameHelper.IsGiftSwitch())
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddViewoffUI_Open);
|
||||
// SaveData.GetSaveObject().game_fail_off_number = 0;
|
||||
// if (SaveData.GetSaveObject().addview_off_time < GameHelper.GetNowTime())
|
||||
// {
|
||||
// SaveData.GetSaveObject().addview_off_time = (int)GameHelper.GetNowTime() + ConfigSystem.GetConfig<CommonModel>().AddDiscountCD;
|
||||
// }
|
||||
// is_showslot = true;
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
|
||||
return;
|
||||
}
|
||||
// if (SaveData.GetSaveObject().game_fail_number >= ConfigSystem.GetConfig<CommonModel>().AddSpaceLevel && !is_showslot && !SaveData.GetSaveObject().have_slot)
|
||||
// {
|
||||
//
|
||||
// if (SaveData.GetSaveObject().addview_off_time > GameHelper.GetNowTime() && GameHelper.IsGiftSwitch())
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddViewoffUI_Open);
|
||||
// else
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuyslotUI_Open);
|
||||
// SaveData.GetSaveObject().game_fail_number = 0;
|
||||
// is_showslot = true;
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (SaveData.GetSaveObject().game_fail_number >= ConfigSystem.GetConfig<CommonModel>().AddSpaceLevel && !is_showslot && !SaveData.GetSaveObject().have_slot)
|
||||
{
|
||||
|
||||
if (SaveData.GetSaveObject().addview_off_time > GameHelper.GetNowTime() && GameHelper.IsGiftSwitch())
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddViewoffUI_Open);
|
||||
else
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuyslotUI_Open);
|
||||
SaveData.GetSaveObject().game_fail_number = 0;
|
||||
is_showslot = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((complte_progress > ((float)ConfigSystem.GetConfig<CommonModel>().FailedGiftProgress / 100)) && !is_resurgence&&GameHelper.IsGiftSwitch())
|
||||
{
|
||||
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ResurgenceUI_Open, complte_progress);
|
||||
is_resurgence = true;
|
||||
return;
|
||||
}
|
||||
// if ((complte_progress > ((float)ConfigSystem.GetConfig<CommonModel>().FailedGiftProgress / 100)) && !is_resurgence&&GameHelper.IsGiftSwitch())
|
||||
// {
|
||||
//
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ResurgenceUI_Open, complte_progress);
|
||||
// is_resurgence = true;
|
||||
// return;
|
||||
// }
|
||||
|
||||
DOVirtual.DelayedCall(0.75f, () =>
|
||||
{
|
||||
@@ -1752,36 +1884,36 @@ namespace ChillConnect
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SaveData.GetSaveObject().game_fail_off_number >= ConfigSystem.GetConfig<CommonModel>().AddDiscountLevel && !is_showslot && !SaveData.GetSaveObject().have_slot && GameHelper.IsGiftSwitch())
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddViewoffUI_Open);
|
||||
SaveData.GetSaveObject().game_fail_off_number = 0;
|
||||
if (SaveData.GetSaveObject().addview_off_time < GameHelper.GetNowTime())
|
||||
{
|
||||
SaveData.GetSaveObject().addview_off_time = (int)GameHelper.GetNowTime() + ConfigSystem.GetConfig<CommonModel>().AddDiscountCD;
|
||||
}
|
||||
is_showslot = true;
|
||||
return;
|
||||
}
|
||||
// if (SaveData.GetSaveObject().game_fail_off_number >= ConfigSystem.GetConfig<CommonModel>().AddDiscountLevel && !is_showslot && !SaveData.GetSaveObject().have_slot && GameHelper.IsGiftSwitch())
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddViewoffUI_Open);
|
||||
// SaveData.GetSaveObject().game_fail_off_number = 0;
|
||||
// if (SaveData.GetSaveObject().addview_off_time < GameHelper.GetNowTime())
|
||||
// {
|
||||
// SaveData.GetSaveObject().addview_off_time = (int)GameHelper.GetNowTime() + ConfigSystem.GetConfig<CommonModel>().AddDiscountCD;
|
||||
// }
|
||||
// is_showslot = true;
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (SaveData.GetSaveObject().game_fail_number >= ConfigSystem.GetConfig<CommonModel>().AddSpaceLevel && !is_showslot && !SaveData.GetSaveObject().have_slot)
|
||||
{
|
||||
|
||||
if (SaveData.GetSaveObject().addview_off_time > GameHelper.GetNowTime() && GameHelper.IsGiftSwitch())
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddViewoffUI_Open);
|
||||
else
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuyslotUI_Open);
|
||||
SaveData.GetSaveObject().game_fail_number = 0;
|
||||
is_showslot = true;
|
||||
return;
|
||||
}
|
||||
if ((complte_progress > ((float)ConfigSystem.GetConfig<CommonModel>().FailedGiftProgress / 100)) && !is_resurgence&&GameHelper.IsGiftSwitch())
|
||||
{
|
||||
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ResurgenceUI_Open, complte_progress);
|
||||
is_resurgence = true;
|
||||
return;
|
||||
}
|
||||
// if (SaveData.GetSaveObject().game_fail_number >= ConfigSystem.GetConfig<CommonModel>().AddSpaceLevel && !is_showslot && !SaveData.GetSaveObject().have_slot)
|
||||
// {
|
||||
//
|
||||
// if (SaveData.GetSaveObject().addview_off_time > GameHelper.GetNowTime() && GameHelper.IsGiftSwitch())
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddViewoffUI_Open);
|
||||
// else
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuyslotUI_Open);
|
||||
// SaveData.GetSaveObject().game_fail_number = 0;
|
||||
// is_showslot = true;
|
||||
// return;
|
||||
// }
|
||||
// if ((complte_progress > ((float)ConfigSystem.GetConfig<CommonModel>().FailedGiftProgress / 100)) && !is_resurgence&&GameHelper.IsGiftSwitch())
|
||||
// {
|
||||
//
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ResurgenceUI_Open, complte_progress);
|
||||
// is_resurgence = true;
|
||||
// return;
|
||||
// }
|
||||
//通关失败
|
||||
float[] cash_array = GameHelper.GetRewardValue(2);
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
HallManager.Instance.UpdateSecondEvent -= upTime;
|
||||
|
||||
RankSystemMgr.Instance.upRewardAndRank();
|
||||
@@ -71,7 +72,7 @@ namespace ChillConnect
|
||||
{
|
||||
ui.group_top.y += 68;
|
||||
}
|
||||
|
||||
WebviewManager.Instance.SetDarkThough(false);
|
||||
TrackKit.SendEvent(Property.rank_Event,Property.RankShow);
|
||||
|
||||
HallManager.Instance.UpdateSecondEvent += upTime;
|
||||
|
||||
@@ -47,6 +47,7 @@ namespace ChillConnect
|
||||
protected override void OnClose()
|
||||
{
|
||||
AdRedeemManager.Instance.Destroy();
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
@@ -60,6 +61,7 @@ namespace ChillConnect
|
||||
{
|
||||
ui.group_top.y += 68;
|
||||
}
|
||||
WebviewManager.Instance.SetDarkThough(false);
|
||||
rewardList = SaveData.GetRankData().rankRewardData;
|
||||
InitView();
|
||||
|
||||
|
||||
@@ -77,8 +77,8 @@ namespace ChillConnect
|
||||
{
|
||||
if (args == null || model.recordList == null) return;
|
||||
|
||||
Debug.Log($" barry refresh args == {args}");
|
||||
Debug.Log($" barry refresh list == {model.recordList.Count}");
|
||||
// Debug.Log($" barry refresh args == {args}");
|
||||
// Debug.Log($" barry refresh list == {model.recordList.Count}");
|
||||
if (model.recordList.Count >= 9)
|
||||
{
|
||||
model.recordList.RemoveAt(0);
|
||||
|
||||
@@ -95,7 +95,16 @@ namespace ChillConnect
|
||||
|
||||
var value = GetRewardValue();
|
||||
ui.text_num.text = GameHelper.Get101Str(value);
|
||||
ui.btn_collect.title = "Claim(<img src='ui://o9974uc5k1oncy'/>" + GameHelper.Get101Str((decimal)value) + ")";
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
{
|
||||
ui.text_num.text = GameHelper.Get102Str(value);
|
||||
|
||||
ui.btn_collect.title = "" + GameHelper.Get102Str((decimal)value);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.btn_collect.title ="(" + "Claim(<img src='ui://o9974uc5k1oncy'/>" + GameHelper.Get101Str((decimal)value) + ")";
|
||||
}
|
||||
DOVirtual.DelayedCall(0.2f, () =>
|
||||
{
|
||||
var gamwin =
|
||||
@@ -103,6 +112,7 @@ namespace ChillConnect
|
||||
gamwin.state.SetAnimation(0, "out", true);
|
||||
});
|
||||
|
||||
ui.gift.selectedIndex = GameHelper.IsGiftSwitch()? 1 : 0;
|
||||
ui.btn_multi.SetClick(OnClickDouble);
|
||||
ui.btn_collect.SetClick(OnClickClaim);
|
||||
if (ctrl.rewardInfo.sign_in_days == 6)
|
||||
@@ -154,13 +164,14 @@ namespace ChillConnect
|
||||
}
|
||||
cash_num = value;
|
||||
|
||||
var src = GameHelper.IsGiftSwitch() ? "(" : "(<img src='ui://o9974uc5cou6b8'/>";
|
||||
(ui.wheel.GetChild("wheel_") as wheel_).t0.Play(Scroll);
|
||||
(ui.wheel.GetChild("wheel_") as wheel_).t1.Play(() =>
|
||||
{
|
||||
rate_idnex++;
|
||||
ui.btn_multi.title = "(<img src='ui://o9974uc5cou6b8'/>"+ cash_num * boost_array[rate_idnex % 5] + ")";
|
||||
ui.btn_multi.title = src + cash_num * boost_array[rate_idnex % 5] + ")";
|
||||
});
|
||||
ui.btn_multi.title = "(<img src='ui://o9974uc5cou6b8'/>" + cash_num * boost_array[4] + ")";
|
||||
ui.btn_multi.title = src + cash_num * boost_array[4] + ")";
|
||||
|
||||
list_1 = new List<item_wheel>() { (ui.wheel.GetChild("wheel_") as wheel_).item_0, (ui.wheel.GetChild("wheel_") as wheel_).item_1, (ui.wheel.GetChild("wheel_") as wheel_).item_2, (ui.wheel.GetChild("wheel_") as wheel_).item_3, (ui.wheel.GetChild("wheel_") as wheel_).item_4, (ui.wheel.GetChild("wheel_") as wheel_).item_5, (ui.wheel.GetChild("wheel_") as wheel_).item_6, (ui.wheel.GetChild("wheel_") as wheel_).item_7, };
|
||||
// list_1[2].img_light.visible = true;
|
||||
@@ -284,10 +295,17 @@ namespace ChillConnect
|
||||
list_1[i].text_rate.text = "X" + rate_list[i];
|
||||
}
|
||||
|
||||
(ui.wheel.GetChild("wheel_") as wheel_).t1.Play(() =>
|
||||
var src = "(";
|
||||
var rewards = GameHelper.Get102Str((decimal)cash_num * boost_array[rate_idnex % boost_array.Length]);
|
||||
if (!GameHelper.IsGiftSwitch()){
|
||||
src = "(<img src='ui://o9974uc5cou6b8'/>";
|
||||
rewards = GameHelper.Get101Str((decimal)cash_num * boost_array[rate_idnex % boost_array.Length]);
|
||||
}
|
||||
|
||||
(ui.wheel.GetChild("wheel_") as wheel_).t1.Play(() =>
|
||||
{
|
||||
rate_idnex++;
|
||||
ui.btn_multi.title ="(<img src='ui://o9974uc5cou6b8'/>" + GameHelper.Get101Str((decimal)cash_num * boost_array[rate_idnex % boost_array.Length]) + ")";
|
||||
ui.btn_multi.title =src + rewards + ")";
|
||||
});
|
||||
|
||||
(ui.wheel.GetChild("wheel_") as wheel_).t0.Play(Scroll);
|
||||
@@ -339,10 +357,11 @@ namespace ChillConnect
|
||||
// return;
|
||||
// }
|
||||
|
||||
var src = GameHelper.IsGiftSwitch() ? "(" : "(<img src='ui://o9974uc5cou6b8'/>";
|
||||
(ui.wheel.GetChild("wheel_") as wheel_).t1.Play(() =>
|
||||
{
|
||||
rate_idnex++;
|
||||
ui.btn_multi.title = "(<img src='ui://o9974uc5cou6b8'/>" + GameHelper.Get101Str((decimal)cash_num * boost_array[rate_idnex % boost_array.Length]) + ")";
|
||||
ui.btn_multi.title = src + GameHelper.Get101Str((decimal)cash_num * boost_array[rate_idnex % boost_array.Length]) + ")";
|
||||
});
|
||||
|
||||
(ui.wheel.GetChild("wheel_") as wheel_).t0.Play(Scroll);
|
||||
|
||||
@@ -2,7 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using DG.Tweening;
|
||||
using Dont_Confuse;
|
||||
using IgnoreOPS;
|
||||
using IgnoreOPS;
|
||||
using FairyGUI;
|
||||
using FGUI.Common_01;
|
||||
@@ -54,7 +54,8 @@ namespace ChillConnect
|
||||
HallManager.Instance.UpdateSecondEvent -= updateSpeedCD;
|
||||
HallManager.Instance.UpdateSecondEvent -= Update;
|
||||
closeCallback?.Invoke();
|
||||
WebviewManager.ShezhiACT(true);
|
||||
// WebviewManager.ShezhiACT(true);
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.RefreshSaveingPot);
|
||||
|
||||
@@ -76,7 +77,8 @@ namespace ChillConnect
|
||||
ui.group_.y += Screen.safeArea.y;
|
||||
}
|
||||
|
||||
WebviewManager.ShezhiACT(false);
|
||||
// WebviewManager.ShezhiACT(false);
|
||||
WebviewManager.Instance.SetDarkThough(false);
|
||||
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Close);
|
||||
|
||||
@@ -144,7 +146,7 @@ namespace ChillConnect
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
Debug.Log(DataMgr.ExchangeAccount);
|
||||
Debug.Log($"DataMgr.ExchangeAccount====={DataMgr.ExchangeAccount.Value}");
|
||||
Makeup_2 makeupVo = ConfigSystem.GetConfig<MakeupModel_2>().GetData(makeupTaskData.tableId);
|
||||
ui.text_ad.text = string.Format(GameHelper.getDesByKey("saving_pot_5"), makeupVo.ADIncrease);
|
||||
string str = string.Format(GameHelper.getDesByKey("saving_pot_2"), makeupVo.PayIncrease);
|
||||
@@ -211,7 +213,7 @@ namespace ChillConnect
|
||||
}
|
||||
else if (makeupTaskData.status == SaveingPotTaskStatus.None)
|
||||
{
|
||||
if (DataMgr.ExchangeAccount == null)
|
||||
if (DataMgr.ExchangeAccount.Value == null)
|
||||
{
|
||||
Debug.Log("enter");
|
||||
OnEnter();
|
||||
@@ -804,7 +806,7 @@ namespace ChillConnect
|
||||
GameHelper.ShowTips("Please enter the correct account information4", true);
|
||||
return;
|
||||
}
|
||||
DataMgr.ExchangeAccount .Value= account;
|
||||
DataMgr.ExchangeAccount.Value= account;
|
||||
DataMgr.ExchangeName .Value= $"{fname} {lname}";
|
||||
DataMgr.short_name = fname;
|
||||
DataMgr.long_name = lname;
|
||||
@@ -825,17 +827,17 @@ namespace ChillConnect
|
||||
|
||||
|
||||
ui.com_pay.text_name.text = DataMgr.ExchangeName .Value;
|
||||
ui.com_pay.text_email.text = DataMgr.ExchangeAccount .Value;
|
||||
ui.com_pay.text_email.text = DataMgr.ExchangeAccount.Value;
|
||||
|
||||
ui.com_pay.btn_change.SetClick(() =>
|
||||
{
|
||||
DataMgr.ExchangeName = null;
|
||||
DataMgr.ExchangeAccount = null;
|
||||
DataMgr.ExchangeAccount.Value = null;
|
||||
OnEnter();
|
||||
|
||||
});
|
||||
|
||||
var avatarId = DataMgr.PlayerAvatarId .Value;
|
||||
var avatarId = DataMgr.PlayerAvatarId.Value;
|
||||
TextureHelper.SetAvatarToLoader(avatarId, ui.com_pay.head.GetChild("load_avatar") as GLoader);
|
||||
ui.btn_confirm.SetClick(() =>
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace ChillConnect
|
||||
protected override void OnClose()
|
||||
{
|
||||
AdRedeemManager.Instance.Destroy();
|
||||
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
GameHelper.showGameUI = true;
|
||||
HallManager.Instance.UpdateSecondEvent -= initList;
|
||||
HallManager.Instance.UpdateSecondEvent -= upWatchAdsBtn;
|
||||
@@ -78,7 +78,7 @@ namespace ChillConnect
|
||||
{
|
||||
isAutoPop = (bool)args;
|
||||
}
|
||||
|
||||
WebviewManager.Instance.SetDarkThough(false);
|
||||
// test
|
||||
// SaveData.GetSaveObject().remove_ad_time = Convert.ToInt32(GameHelper.GetNowTime()) + 5;
|
||||
// SaveData.GetSaveObject().is_get_removead = true;
|
||||
|
||||
@@ -6,6 +6,7 @@ using DG.Tweening;
|
||||
using FairyGUI;
|
||||
using FGUI.Signin_19;
|
||||
using IgnoreOPS;
|
||||
using SGModule.Common.Extensions;
|
||||
using Spine.Unity;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -106,6 +107,8 @@ namespace ChillConnect
|
||||
|
||||
var signList = signModel.DataList;
|
||||
|
||||
ui.com_gold.visible = !GameHelper.IsGiftSwitch();
|
||||
|
||||
// Debug.Log($"signList.Count:{signList.Count}");
|
||||
for (int i = 0; i < signList.Count; i++)
|
||||
{
|
||||
@@ -123,12 +126,13 @@ namespace ChillConnect
|
||||
private void RefreshView(btn_sign btnSign, SignDailyReward reward, int index)
|
||||
{
|
||||
btnSign.title = "0" + reward.id;
|
||||
btnSign.reward_num.text = GameHelper.Get101Str(reward.quantity[0]);
|
||||
btnSign.reward_num.text = GameHelper.IsGiftSwitch()?GameHelper.getChString(reward.quantity[0]):GameHelper.Get101Str(reward.quantity[0]);
|
||||
|
||||
btnSign.day.selectedIndex = index != 6 ? 0 : 1;
|
||||
|
||||
if (index == 6)
|
||||
btnSign.day.selectedIndex = 0;
|
||||
btnSign.isGift.selectedIndex = GameHelper.IsGiftSwitch()? 1 : 0;
|
||||
if (index == 6 && reward.quantity.Length > 1)
|
||||
{
|
||||
btnSign.day.selectedIndex = 1;
|
||||
btnSign.reward_num1.text = GameHelper.Get101Str(reward.quantity[1]);
|
||||
setItemUrl(btnSign.loader_icon0, reward.rewards_type[1]);
|
||||
}
|
||||
@@ -190,6 +194,7 @@ namespace ChillConnect
|
||||
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
|
||||
else if (urltype == 4) loader.url = "ui://Common_01/record_money"; //shuaxin
|
||||
}
|
||||
private Action closeCallback;
|
||||
|
||||
@@ -197,12 +202,27 @@ namespace ChillConnect
|
||||
{
|
||||
|
||||
var rewardModel = new RewardData();
|
||||
|
||||
for (var i = 0; i < vo.item1.Length; i++)
|
||||
{
|
||||
var rewardData = new RewardSingleData(101, vo.quantity[i], RewardOrigin.SignIn, sign_day)
|
||||
var points = ui.point;
|
||||
var typeId = 101;
|
||||
|
||||
var rewardNum = vo.quantity[i];
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
{
|
||||
points = ui.point1;
|
||||
typeId = vo.item1[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
rewardNum = GameHelper.Get101Str(vo.quantity[i]).As<decimal>();
|
||||
}
|
||||
|
||||
var rewardData = new RewardSingleData(typeId, rewardNum, RewardOrigin.SignIn, sign_day)
|
||||
{
|
||||
startPosition = startPos,
|
||||
endPosition = new Vector2(ui.point.x - 110, ui.point.y - 110)
|
||||
endPosition = new Vector2(points.x - 110, points.y - 110)
|
||||
|
||||
};
|
||||
rewardModel.AddReward(rewardData);
|
||||
@@ -230,7 +250,11 @@ namespace ChillConnect
|
||||
|
||||
// 用来刷新todo界面的一些信息,如红点等
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.UpdateTodoView);
|
||||
CommonHelper.ShowNumAnim(ui.com_gold.GetChild("text_gold") as GTextField, vo.quantity[0], 101);
|
||||
|
||||
if (!GameHelper.IsGiftSwitch() || vo.item1[0] == 101)
|
||||
{
|
||||
CommonHelper.ShowNumAnim(ui.com_gold.GetChild("text_gold") as GTextField, vo.quantity[0], 101);
|
||||
}
|
||||
|
||||
|
||||
// CtrlCloseUI();
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2bcb268078e9429ebdf912b4ce1f287f
|
||||
timeCreated: 1780560480
|
||||
@@ -0,0 +1,42 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class StatementViewCtrl : BaseCtrl
|
||||
{
|
||||
public static StatementViewCtrl Instance { get; private set; }
|
||||
|
||||
private StatementViewModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.FirstRewardModel) as FirstRewardModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4632715ec0e54eeea0b7d484a9b85252
|
||||
timeCreated: 1780455331
|
||||
@@ -0,0 +1,43 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class StatementViewModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
// protected override void OnReset()
|
||||
// {
|
||||
// }
|
||||
// #endregion
|
||||
|
||||
// #region 读取数据
|
||||
// protected override void OnReadData()
|
||||
// {
|
||||
// }
|
||||
// #endregion
|
||||
|
||||
// #region 本地存储
|
||||
// protected override void WriteLocalStorage()
|
||||
// {
|
||||
|
||||
// }
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: faf951d22aea4319860cef683fcbed35
|
||||
timeCreated: 1780455331
|
||||
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
// using FGUI.G002_main;
|
||||
using Spine.Unity;
|
||||
using DG.Tweening;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class StatementViewUI : BaseUI
|
||||
{
|
||||
private StatementViewUICtrl ctrl;
|
||||
private StatementViewModel model;
|
||||
private FGUI.Lobby_03.com_statement ui;
|
||||
private Action closeCallback;
|
||||
private Action open_sign;
|
||||
private bool is_get = false;
|
||||
public StatementViewUI(StatementViewUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.StatementViewUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "Lobby_03";
|
||||
uiInfo.assetName = "com_statement";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
model = ModuleManager.Instance.GetModel(ModelConst.StatementViewModel) as StatementViewModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
//open_sign();
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.Lobby_03.com_statement;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
|
||||
InitView();
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
//open_sign = (System.Action)args;
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDisplay(object args)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
ui.list.scrollPane.onScrollEnd.Add(OnListScroll);
|
||||
ui.btn_back.SetClick(CtrlCloseUI);
|
||||
}
|
||||
|
||||
private void OnListScroll()
|
||||
{
|
||||
var pageIndex = ui.list.scrollPane.currentPageX;
|
||||
|
||||
if (pageIndex == 0)
|
||||
{
|
||||
ui.state1.state.selectedIndex = 1;
|
||||
ui.state2.state.selectedIndex = 0;
|
||||
}else if (pageIndex == 1)
|
||||
{
|
||||
ui.state1.state.selectedIndex = 0;
|
||||
ui.state2.state.selectedIndex = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 65fe960a02344337a6c757d93ecf0e2e
|
||||
timeCreated: 1780455331
|
||||
@@ -0,0 +1,71 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class StatementViewUICtrl : BaseUICtrl
|
||||
{
|
||||
private StatementViewUI ui;
|
||||
private StatementViewModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.StatementViewUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.StatementViewUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.FirstRewardModel) as FirstRewardModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new StatementViewUI(this);
|
||||
ui.Open(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b350591ec8f41db9c3dda52f01b53c7
|
||||
timeCreated: 1780455331
|
||||
@@ -7,6 +7,7 @@ using FairyGUI;
|
||||
using FGUI.Common_01;
|
||||
using FGUI.Turntable_11;
|
||||
using IgnoreOPS;
|
||||
using SGModule.Common.Extensions;
|
||||
using Spine.Unity;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -173,6 +174,7 @@ namespace ChillConnect
|
||||
}
|
||||
|
||||
item.text_num.text = id == 102 ? GameHelper.Get102Str((decimal)quantity) : GameHelper.Get101Str((decimal)quantity);
|
||||
Debug.Log($"wheel id=========={id}");
|
||||
item.status.selectedIndex = id == 102 ? com_coin.Status_b : com_coin.Status_a;
|
||||
}
|
||||
|
||||
@@ -279,13 +281,21 @@ namespace ChillConnect
|
||||
var id = vo.wheel_item;
|
||||
var quantity = vo.quantity;
|
||||
|
||||
if (id == 0)
|
||||
if (!GameHelper.IsGiftSwitch() && id == 102)
|
||||
{
|
||||
id = 101;
|
||||
quantity *= 10;
|
||||
}
|
||||
|
||||
// if (id == 0)
|
||||
// {
|
||||
var endui = id == 101 ? ui.point : ui.point1;
|
||||
|
||||
var startPoint = GameHelper.GetUICenterPosition(ui.startpoint);
|
||||
var endPoint = GameHelper.GetUICenterPosition(ui.point);
|
||||
var endPoint = GameHelper.GetUICenterPosition(endui);
|
||||
|
||||
var rewardData = new RewardData();
|
||||
var rewardSingleData = new RewardSingleData(101, (decimal)quantity, RewardOrigin.LuckyWheel)
|
||||
var rewardSingleData = new RewardSingleData(id, (decimal)quantity, RewardOrigin.LuckyWheel)
|
||||
{
|
||||
startPosition = startPoint,
|
||||
endPosition = new Vector2(endPoint.x - 150, endPoint.y - 136),
|
||||
@@ -298,12 +308,12 @@ namespace ChillConnect
|
||||
normalAnim.state.SetAnimation(0, "daiji", true);
|
||||
});
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameHelper.AddItemNumber(id - 1, (int)quantity);
|
||||
GameHelper.ShowTips("Successfully received");
|
||||
}
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GameHelper.AddItemNumber(id - 1, (int)quantity);
|
||||
// GameHelper.ShowTips("Successfully received");
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user