123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using System.Collections.Generic;
- using UnityEngine;
- using WS;
- public class FlowManager : MonoBehaviour
- {
- public static FlowManager Inst;
- public CursorManager.CursorState cursorState;
- public List<FlowBase> flows;
- public int flowIndex;
- public FlowBase currFlowBase;
- void Start()
- {
- Inst = this;
- CursorManager.Instance.SetCursorState(cursorState);
- StartFlow();
- }
- // Update is called once per frame
- void Update()
- {
- if (currFlowBase != null)
- {
- currFlowBase.UpdateFlow();
- }
- }
- private void StartFlow()
- {
- if (FacadeComponent.Instance.GetController<PointController>() == null)
- FacadeComponent.Instance.CreateController<PointController>().OpenView();
- flowIndex = 0;
- currFlowBase = flows[flowIndex];
- }
- public void NextFlow()
- {
- flowIndex += 1;
- if (flowIndex < flows.Count)
- {
- currFlowBase = flows[flowIndex];
- currFlowBase.StartFlow();
- }
- else
- {
- Debug.Log("Á÷³Ì½áÊø");
- }
- }
- public void LastFlow() { }
- private void EndFlow() { }
- public void CheckCollider(Collider collider, bool isEnter)
- {
- if (currFlowBase.state == FlowBase.FlowState.Collider)
- {
- ((FlowCollider)currFlowBase).CheckPoint(collider, isEnter);
- }
- }
- }
|