using DG.Tweening; using UnityEngine; /******************************************************************************* *Create By CG *Function 将保护盖取下 *******************************************************************************/ namespace ZXK.GYJQR { public class KaiGaiZiCtrl : Step_0 { public KaiGaiZiCtrl(AZBS itemAttr) : base(itemAttr) { } /// /// 执行路径位移的逻辑 /// public void OnExcutePathMove(Vector3 MovePos, string JumpStepName) { PathManager pm = outLineParts[0].GetComponent() ? outLineParts[0].GetComponent() : outLineParts[0].AddComponent(); 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); }; }); } } }