33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
using DG.Tweening;
|
|
using UnityEngine;
|
|
/*******************************************************************************
|
|
*Create By CG
|
|
*Function 将保护盖取下
|
|
*******************************************************************************/
|
|
namespace ZXK.GYJQR
|
|
{
|
|
public class KaiGaiZiCtrl : Step_0
|
|
{
|
|
public KaiGaiZiCtrl(AZBS itemAttr) : base(itemAttr) { }
|
|
/// <summary>
|
|
/// 执行路径位移的逻辑
|
|
/// </summary>
|
|
public void OnExcutePathMove(Vector3 MovePos, string JumpStepName)
|
|
{
|
|
PathManager pm = outLineParts[0].GetComponent<PathManager>() ? outLineParts[0].GetComponent<PathManager>() : outLineParts[0].AddComponent<PathManager>();
|
|
pm.onMouseDown = new UnityEngine.Events.UnityEvent();
|
|
pm.onMouseDown.AddListener(() =>
|
|
{
|
|
if (!CG.UTility.PopUpMng._TriAble) return;
|
|
|
|
pm.transform.DOLocalMove(MovePos, 2.0f).onComplete += () =>
|
|
{
|
|
outLineParts[0].SetActive(false);
|
|
StepEnd();
|
|
pm.onMouseDown.RemoveAllListeners();
|
|
StepManager.Instance.SwitchStep(JumpStepName);
|
|
};
|
|
});
|
|
}
|
|
}
|
|
} |