2026-06-12 18:10:00 +08:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using DG.Tweening;
|
|
|
|
|
using IgnoreOPS;
|
|
|
|
|
using FairyGUI;
|
|
|
|
|
using FGUI.Common_01;
|
|
|
|
|
using FGUI.GameResult_08;
|
|
|
|
|
using IgnoreOPS;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using Spine.Unity;
|
|
|
|
|
using UnityEngine;
|
2026-06-13 15:34:00 +08:00
|
|
|
using btn_claim = FGUI.Common_01.btn_claim;
|
2026-06-12 18:10:00 +08:00
|
|
|
using Random = UnityEngine.Random;
|
|
|
|
|
|
|
|
|
|
namespace ChillConnect
|
|
|
|
|
{
|
|
|
|
|
public class GameResultUI : BaseUI
|
|
|
|
|
{
|
|
|
|
|
private GameResultUICtrl ctrl;
|
|
|
|
|
private GameResultModel model;
|
2026-06-13 15:34:00 +08:00
|
|
|
private com_arrow_end ui;
|
|
|
|
|
|
2026-06-12 18:10:00 +08:00
|
|
|
private Action closeCallback;
|
2026-06-13 15:34:00 +08:00
|
|
|
|
2026-06-12 18:10:00 +08:00
|
|
|
|
|
|
|
|
public GameResultUI(GameResultUICtrl ctrl) : base(ctrl)
|
|
|
|
|
{
|
|
|
|
|
uiName = UIConst.GameResultUI;
|
|
|
|
|
this.ctrl = ctrl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void SetUIInfo(UIInfo uiInfo)
|
|
|
|
|
{
|
|
|
|
|
uiInfo.packageName = "GameResult_08";
|
2026-06-13 15:34:00 +08:00
|
|
|
uiInfo.assetName = "com_arrow_end";
|
2026-06-12 18:10:00 +08:00
|
|
|
uiInfo.layerType = UILayerType.Popup;
|
2026-06-13 15:34:00 +08:00
|
|
|
uiInfo.isNeedOpenAnim = true;
|
|
|
|
|
uiInfo.isNeedCloseAnim = true;
|
2026-06-12 18:10:00 +08:00
|
|
|
uiInfo.isNeedUIMask = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 生命周期
|
|
|
|
|
|
|
|
|
|
protected override void OnInit()
|
|
|
|
|
{
|
|
|
|
|
//model = ModuleManager.Instance.GetModel(ModelConst.GameResultModel) as GameResultModel;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnClose()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
protected override void OnBind()
|
|
|
|
|
{
|
2026-06-13 15:34:00 +08:00
|
|
|
ui = baseUI as com_arrow_end;
|
2026-06-12 18:10:00 +08:00
|
|
|
}
|
|
|
|
|
private SuccessData successData_;
|
|
|
|
|
|
2026-06-13 15:34:00 +08:00
|
|
|
protected override void OnOpenBefore(object args)
|
2026-06-12 18:10:00 +08:00
|
|
|
{
|
2026-06-13 15:34:00 +08:00
|
|
|
((btn_claim)ui.btn_watchAd).state.selectedIndex = DataMgr.ArrowResultLevel.Value == 1 ? 1 : 0;
|
|
|
|
|
((btn_claim)ui.btn_watchAd).title = DataMgr.ArrowResultLevel.Value == 1 ? "Free Revive" : "Revive";
|
|
|
|
|
|
|
|
|
|
ui.btn_watchAd.SetClick(() =>
|
|
|
|
|
{
|
|
|
|
|
if (DataMgr.ArrowResultLevel.Value == 1)
|
|
|
|
|
{
|
|
|
|
|
DataMgr.ArrowResultLevel.Value = 0;
|
|
|
|
|
GameDispatcher.Instance.Dispatch(GameMsg.reset_game, true);
|
|
|
|
|
}
|
|
|
|
|
else if (DataMgr.ArrowResultLevel.Value == 0)
|
|
|
|
|
{
|
|
|
|
|
GameHelper.ShowVideoAd("gameResult", success =>
|
|
|
|
|
{
|
|
|
|
|
if (success)
|
|
|
|
|
{
|
|
|
|
|
GameDispatcher.Instance.Dispatch(GameMsg.reset_game, true);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
CtrlCloseUI();
|
2026-06-12 18:10:00 +08:00
|
|
|
});
|
2026-06-13 15:34:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
ui.btn_restart.SetClick(() =>
|
2026-06-12 18:10:00 +08:00
|
|
|
{
|
2026-06-13 15:34:00 +08:00
|
|
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.GameAgainUI_Open);
|
|
|
|
|
CtrlCloseUI();
|
2026-06-12 18:10:00 +08:00
|
|
|
});
|
|
|
|
|
}
|
2026-06-13 15:34:00 +08:00
|
|
|
|
2026-06-12 18:10:00 +08:00
|
|
|
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 int time_count;
|
2026-06-13 15:34:00 +08:00
|
|
|
|
2026-06-12 18:10:00 +08:00
|
|
|
}
|
|
|
|
|
}
|