ShanxiKnowledgeBase/SXElectricalInspection/Assets/Script/Flow/FlowsBase.cs

83 lines
1.9 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FlowsBase : MonoBehaviour
{
[HideInInspector]
public FlowManager flowManager;
public int ;
public string ;
public = .;
public ;
public GameObject ;
public List<ToolBase> = new List<ToolBase>();
//[HideInInspector]
public int ;
public = .;
public float ;
/// <summary>
/// 判断是否完成
/// </summary>
private bool ;
public bool ;
// Start is called before the first frame update
protected virtual void Start()
{
// 流程物体 = new List<ToolBase>();
= gameObject.name;
flowManager = GameObject.Find("GameFlowManager").GetComponent<FlowManager>();
}
protected virtual void Update()
{
();
}
protected virtual void ()
{ if ( == .)
{
flowManager. += ;
}
}
/// <summary>
/// 侦测步骤是否完成
/// </summary>
protected virtual void ()
{
if ( == .Count&& == false)
{
if ( == .)
{
= .;
();
= true;
}
}
}
/// <summary>
/// 侦测步骤是否完成,如果完成则开始下一步
/// </summary>
protected virtual void Next() {
if (flowManager. == . && == false && == .)
{
Debug.Log("下一步");
flowManager.index = ;
= true;
}
}
}