using Excel2Json; using Fort23.UTool; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; namespace Fort23.Mono { [UIBinding(prefab = "GuidePanel")] public partial class GuidePanel : UIPanel { private void Init() { } protected override void AddEvent() { } private void SkipGuide() { PlayerGuideManager.Instance.guideLogic.SkipGuide(); } protected override void DelEvent() { } public override void AddButtonEvent() { Btn_Skip.onClick.AddListener(async () => { // bool isKip = await UIManager.Instance.ShowTips("是否确认跳过引导"); // if (isKip) // SkipGuide(); }); Btn_Bg.onClick.AddListener(() => { if (PlayerGuideManager.Instance.guideConfig.desc == -1) { if (PlayerGuideManager.Instance.guideConfig.ForceOnclick == 0) { PlayerGuideManager.Instance.NextGuide(); } } else { PlayerGuideManager.Instance.dialogBox.OnClickScreen(); } }); Btn_MessageBG.onClick.AddListener(() => { PlayerGuideManager.Instance.dialogBox.OnClickScreen(); }); } public void SetTarget(GameObject gameObject) { MyGuideMask.SetTargetImage(gameObject); } /// /// 设置点击屏蔽 /// /// public void SetOnClickMask(bool value) { OnClickMask.gameObject.SetActive(value); } /// /// 设置蒙版点击事件 /// /// public void SetOnClickMaskOnClickAction(UnityAction unityAction) { OnClickMask.onClick.RemoveAllListeners(); OnClickMask.onClick.AddListener(unityAction); } /// /// 设置蒙版大小 /// /// public void SetOnClickMaskSize(Vector2 size) { OnClickMask.GetComponent().sizeDelta = size; } public override void Close() { base.Close(); PlayerGuideManager.Instance._timerEntity?.Dispose(); PlayerGuideManager.Instance._timerEntity = null; } public override void Hide() { base.Hide(); } } }