|
|
@@ -2,6 +2,7 @@
|
|
|
using Sirenix.OdinInspector;
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
+using System.Xml.Linq;
|
|
|
using UnityEngine;
|
|
|
using UnityEngine.PlayerLoop;
|
|
|
|
|
|
@@ -9,16 +10,20 @@ using UnityEngine.PlayerLoop;
|
|
|
public class ProcessEvent_CameraQuickMove : MonoBehaviour
|
|
|
{
|
|
|
public Transform moveTarget;
|
|
|
- public bool quickMove;
|
|
|
+
|
|
|
+ public ProcessElement lastElement;
|
|
|
+ public ProcessElement nextElement;
|
|
|
+
|
|
|
private ProcessElement processElement;
|
|
|
- private PreprocessBase preprocessBase;
|
|
|
- private bool isBool = true;
|
|
|
- public int maxProcess;
|
|
|
- public int minProcess;
|
|
|
+
|
|
|
+
|
|
|
+ public bool isLastBool = false;
|
|
|
+ public bool isDownBool = false;
|
|
|
|
|
|
private int currentProcess;
|
|
|
|
|
|
|
|
|
+
|
|
|
// Start is called before the first frame update
|
|
|
void Awake()
|
|
|
{
|
|
|
@@ -32,40 +37,74 @@ public class ProcessEvent_CameraQuickMove : MonoBehaviour
|
|
|
processElement.preprocess.Preprocess_EnterEvent += ProcessEnter;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- void Update()
|
|
|
- {
|
|
|
-/* if(isBool && processElement.active)
|
|
|
+ if (lastElement.preprocess == null)
|
|
|
+ {
|
|
|
+ lastElement.processElementEnterHandler += lastProcessEnter;
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
+ lastElement.preprocess.Preprocess_EnterEvent += lastProcessEnter;
|
|
|
+ }
|
|
|
|
|
|
- isBool = false;
|
|
|
- }*/
|
|
|
+ if (nextElement.preprocess == null)
|
|
|
+ {
|
|
|
+ nextElement.processElementEnterHandler += nextProcessEnter;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ nextElement.preprocess.Preprocess_EnterEvent += nextProcessEnter;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public void ProcessEnter(ProcessElement process)
|
|
|
{
|
|
|
- if (quickMove)
|
|
|
+
|
|
|
+ if (currentProcess > processElement.stepID && isLastBool)
|
|
|
{
|
|
|
Camera.main.GetComponent<RoamCameraController>().SetCameraState(moveTarget.position, moveTarget.localEulerAngles);
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- CameraLerpMoveController.Instance.SetCameraMoveTarget(moveTarget);
|
|
|
+
|
|
|
+ if (currentProcess < processElement.stepID && isDownBool)
|
|
|
+ {
|
|
|
+ Camera.main.GetComponent<RoamCameraController>().SetCameraState(moveTarget.position, moveTarget.localEulerAngles);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public void ProcessEnter(PreprocessBase process)
|
|
|
{
|
|
|
- if (quickMove)
|
|
|
+
|
|
|
+ if (currentProcess > processElement.stepID && isLastBool)
|
|
|
{
|
|
|
Camera.main.GetComponent<RoamCameraController>().SetCameraState(moveTarget.position, moveTarget.localEulerAngles);
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (currentProcess < processElement.stepID && isDownBool)
|
|
|
{
|
|
|
- CameraLerpMoveController.Instance.SetCameraMoveTarget(moveTarget);
|
|
|
+ Camera.main.GetComponent<RoamCameraController>().SetCameraState(moveTarget.position, moveTarget.localEulerAngles);
|
|
|
}
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public void lastProcessEnter(ProcessElement process)
|
|
|
+ {
|
|
|
+ currentProcess = lastElement.stepID;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void lastProcessEnter(PreprocessBase process)
|
|
|
+ {
|
|
|
+ currentProcess = lastElement.stepID;
|
|
|
}
|
|
|
+
|
|
|
+ public void nextProcessEnter(ProcessElement process)
|
|
|
+ {
|
|
|
+ currentProcess = nextElement.stepID;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void nextProcessEnter(PreprocessBase process)
|
|
|
+ {
|
|
|
+ currentProcess = nextElement.stepID;
|
|
|
+ }
|
|
|
+
|
|
|
}
|