using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; /// /// 直接接入式电能计量装置 步骤状态设置 /// public class StepState_2002 : StepState { /// /// 现场场景中的特殊物体控制 /// private Device_Control_2002 device_Control; private void Awake() { steps.Add(1, E_SceneType.Office); steps.Add(2, E_SceneType.Office); steps.Add(3, E_SceneType.Office); } public override void SetDeviceControl(Device_Control device_Control) { this.device_Control = (Device_Control_2002)device_Control; } public override void SetOrigonFaultOption() { } /// /// 从场景第一步会依次往下执行,直到指定步骤 /// /// public override void SetStepState(int num, int lastNum) { Debug.Log("切换步骤" + num); //删除手里的东西 LiveSceneManager.Instance?.OnCheckSubProcess(); if (num == 1) { //办公室场景首个步骤 //查看任务单 //OfficeManager.Instance.mobileController.downIndex = 0; PacksackBagMgr.Instance.ClearAllData(); GameManager.Instance.ClearTicketsInfo();//HQB 清空工作票 } else if (num == 2) { //工作预约 SorghumController[] sorghumControllers = GameObject.FindObjectsOfType(); foreach (var item in sorghumControllers) { if (item.State == SorghumState.Healthy) { item.triggerName = "高粱_正常1"; break; } } //OfficeManager.Instance.mobileController.downIndex = 1; } else if (num == 3) { //工作预约 //OfficeManager.Instance.mobileController.downIndex = 1; SorghumController[] sorghumControllers = GameObject.FindObjectsOfType(); foreach (var item in sorghumControllers) { if (item.State == SorghumState.Diseased) { item.triggerName = "高粱_病株1"; break; } } } } }