You've already forked taptap2024_GJ_chidouren
init
This commit is contained in:
62
Assets/Scripts/System/Guide/GuideNode.cs
Normal file
62
Assets/Scripts/System/Guide/GuideNode.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
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 ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user