2026-06-17 14:45:28 +08:00
|
|
|
using System;
|
|
|
|
|
using FGUI.Arrow_game;
|
2026-06-18 09:27:38 +08:00
|
|
|
using UnityEngine;
|
2026-06-17 14:45:28 +08:00
|
|
|
|
|
|
|
|
namespace ChillConnect
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public class ArrowTipsUI : BaseUI
|
|
|
|
|
{
|
|
|
|
|
private ArrowTipsUICtrl ctrl;
|
|
|
|
|
private ArrowTipsModel model;
|
|
|
|
|
private com_tips ui;
|
|
|
|
|
|
|
|
|
|
public ArrowTipsUI(ArrowTipsUICtrl ctrl) : base(ctrl)
|
|
|
|
|
{
|
|
|
|
|
uiName = UIConst.ArrowTipsUI;
|
|
|
|
|
this.ctrl = ctrl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void SetUIInfo(UIInfo uiInfo)
|
|
|
|
|
{
|
|
|
|
|
uiInfo.packageName = "Arrow_game";
|
|
|
|
|
uiInfo.assetName = "com_tips";
|
|
|
|
|
uiInfo.layerType = UILayerType.Loading;
|
2026-06-18 09:27:38 +08:00
|
|
|
uiInfo.isNeedUIMask = true;
|
|
|
|
|
uiInfo.isNeedOpenAnim = true;
|
|
|
|
|
uiInfo.isNeedCloseAnim = true;
|
2026-06-17 14:45:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnInit()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnClose()
|
|
|
|
|
{
|
|
|
|
|
CommonHelper.FadeOut(ui);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnBind()
|
|
|
|
|
{
|
|
|
|
|
ui = baseUI as com_tips;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnOpenBefore(object args)
|
|
|
|
|
{
|
2026-06-18 09:27:38 +08:00
|
|
|
if (args != null)
|
|
|
|
|
InitView((int)args);
|
2026-06-17 14:45:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnOpen(object args)
|
|
|
|
|
{
|
|
|
|
|
CommonHelper.FadeIn(ui);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void AddListener()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void RemoveListener()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-18 09:27:38 +08:00
|
|
|
private void InitView(int type)
|
2026-06-17 14:45:28 +08:00
|
|
|
{
|
2026-06-18 09:27:38 +08:00
|
|
|
int state = type;
|
|
|
|
|
Debug.Log($"tips state = {state} ");
|
|
|
|
|
// 0 提示 1 删除道具
|
|
|
|
|
ui.state.selectedIndex = state;
|
|
|
|
|
|
2026-06-17 14:45:28 +08:00
|
|
|
ui.btn_watch.SetClick(() =>
|
|
|
|
|
{
|
2026-06-18 09:27:38 +08:00
|
|
|
string idStr = state == 1 ? "deletePop" : "HintPop";
|
|
|
|
|
GameHelper.ShowVideoAd(idStr, isSuccess =>
|
2026-06-17 14:45:28 +08:00
|
|
|
{
|
|
|
|
|
if (isSuccess)
|
|
|
|
|
{
|
2026-06-18 09:27:38 +08:00
|
|
|
Debug.Log($"isSuccess tips state = {state} ");
|
|
|
|
|
|
|
|
|
|
GameDispatcher.Instance.Dispatch(GameMsg.UseProps, state);
|
2026-06-17 14:45:28 +08:00
|
|
|
CtrlCloseUI();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
ui.btn_close.SetClick(CtrlCloseUI);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|