1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- using System.Collections.Generic;
- using UnityEngine;
- using WS;
- public class FlowManager : MonoBehaviour
- {
- public static FlowManager Inst;
- public List<FlowBase> flows;
- public int flowIndex;
- public FlowBase currFlowBase;
- void Start()
- {
- Inst = this;
- StartFlow();
- }
- // Update is called once per frame
- void Update()
- {
- if (currFlowBase != null)
- {
- currFlowBase.UpdateFlow();
- }
- }
- private void StartFlow()
- {
- FacadeComponent.Instance.CreateController<PointController>().OpenView();
- flowIndex = 0;
- currFlowBase = flows[flowIndex];
- }
- public void NextFlow()
- {
- flowIndex += 1;
- currFlowBase = flows[flowIndex];
- currFlowBase.StartFlow();
- }
- public void LastFlow() { }
- private void EndFlow() { }
- public void CheckCollider(Collider collider, bool isEnter)
- {
- if (currFlowBase.state == FlowBase.FlowState.Collider)
- {
- ((FlowCollider)currFlowBase).CheckPoint(collider, isEnter);
- }
- }
- }
|