Files
RedHotRoast-ios/Assets/Scripts/ModuleUI/GuideView/GuideViewUI.cs
T

82 lines
2.2 KiB
C#
Raw Normal View History

2026-04-22 09:52:55 +08:00
using DG.Tweening;
using System;
using FairyGUI;
using Spine.Unity;
using UnityEngine;
namespace RedHotRoast
2026-04-22 09:52:55 +08:00
{
public class GuideViewUI : BaseUI
{
private GuideViewUICtrl ctrl;
private GuideViewModel model;
private FGUI.ZM_Novice_21.com_guide ui;
2026-04-22 09:52:55 +08:00
protected GProgressBar pb_loading;
private Tweener tweener;
protected int currValue;
public GuideViewUI(GuideViewUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.GuideViewUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "ZM_Novice_21";
2026-04-22 09:52:55 +08:00
uiInfo.assetName = "com_guide";
uiInfo.layerType = UILayerType.Loading;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = false;
}
#region
protected override void OnInit()
{
}
protected override void OnClose()
{
}
protected override void OnBind()
{
ui = baseUI as FGUI.ZM_Novice_21.com_guide;
2026-04-22 09:52:55 +08:00
}
private Action closeCallback;
protected override void OnOpenBefore(object args)
{
TimerHelper.mEasy.AddTimer(0.7f, () =>
{
ui.btn_new_start.visible = true;
// var ska = FXManager.Instance.SetFx<SkeletonAnimation>(ui.btn_new_start.GetChild("btn_parent") as GGraph, Fx_Type.fx_btn_start, ref closeCallback);
// ska.state.SetAnimation(0, "play", true);
2026-04-22 09:52:55 +08:00
var finger = FXManager.Instance.SetFx<SkeletonAnimation>(ui.finger_parent, Fx_Type.fx_hand_pre, ref closeCallback);
finger.state.SetAnimation(0, "idle", true);
});
ui.btn_new_start.SetClick(()=>{
DataMgr.NoviceGuide.Value = true;
2026-04-22 09:52:55 +08:00
GameHelper.gameType = 0;
GameDispatcher.Instance.Dispatch(GameMsg.OpenGame);
CtrlCloseUI();
});
}
protected override void OnOpen(object args)
{
}
#endregion
}
}