You've already forked taptap2024_GJ_chidouren
62 lines
1.9 KiB
C#
62 lines
1.9 KiB
C#
using System.Guide.TriggerModel;
|
|
using Framework.UI;
|
|
using UnityEngine;
|
|
using Framework.Utils;
|
|
using IcecreamView;
|
|
using UnityEngine.Serialization;
|
|
using Views;
|
|
using CameraType = Framework.Utils.CameraType;
|
|
|
|
namespace System.Guide
|
|
{
|
|
public class GuideNode : MonoBehaviour
|
|
{
|
|
[SerializeField, TextArea] internal string Tip;
|
|
[SerializeField] internal bool IsMask;
|
|
[SerializeField] internal GuideNode nextNode;
|
|
[SerializeField] internal CameraType fromCameraType = CameraType.Base;
|
|
[SerializeField] internal Vector2 guideWindowExpend = new Vector2 (65 , 65);
|
|
[SerializeField] internal BaseGuideTrigger _guideTrigger;
|
|
public int code;
|
|
private bool _isInit;
|
|
|
|
internal virtual void StartNode ()
|
|
{
|
|
GuideMgr.Instance.ShowGuideNode (this);
|
|
if (!this._isInit)
|
|
{
|
|
this._isInit = true;
|
|
this.OnInit ();
|
|
}
|
|
|
|
if (!ReferenceEquals (this._guideTrigger , default))
|
|
{
|
|
this._guideTrigger.OnNodeActive (this);
|
|
}
|
|
}
|
|
|
|
public virtual void NextNode ()
|
|
{
|
|
if (!ReferenceEquals (this._guideTrigger , default))
|
|
{
|
|
this._guideTrigger.OnNodeDeActive (this);
|
|
}
|
|
|
|
GuideMgr.Instance.NextNode (this);
|
|
}
|
|
|
|
internal virtual void OnGuidingLogic ()
|
|
{
|
|
UIManager.Instance.OpenView (UIPanel.GuidePanel , new IC_ViewData (this));
|
|
}
|
|
|
|
internal virtual void OnGuidedLogic ()
|
|
{
|
|
UIManager.Instance.CloseView (UIPanel.GuidePanel);
|
|
}
|
|
|
|
protected virtual void OnInit ()
|
|
{
|
|
}
|
|
}
|
|
} |