using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class Device_Mobile : MonoBehaviour { public int downIndex = 0; public int modelID = 5005; public List subProcessStepID = new List(); private void Awake() { subProcessStepID = GameManager.DataMgr.GetSubProcessStepIDByToolID(modelID); } private void Start() { GameManager.EventMgr.AddEventListener(Enum_EventType.SwitchSubProcess, SwitchSubProcess); } private void SwitchSubProcess(int arg0) { if (subProcessStepID.Contains(arg0)) { Debug.Log("我应该提示"); } } private void OnMouseDown() { switch (downIndex) { case 0: if (GameManager.ProcessMgr.CheckSubProcessSteps(4001)) downIndex++; break; case 1: if (GameManager.ProcessMgr.CheckSubProcessSteps(4002)) downIndex++; break; case 2: if (GameManager.ProcessMgr.CheckSubProcessSteps(4003)) downIndex++; break; case 3: if (GameManager.ProcessMgr.CheckSubProcessSteps(4004)) downIndex++; break; case 4: if (GameManager.ProcessMgr.CheckSubProcessSteps(4005)) downIndex++; break; case 5: if (GameManager.ProcessMgr.CheckSubProcessSteps(4006)) downIndex++; break; case 6: if (GameManager.ProcessMgr.CheckSubProcessSteps(4007)) downIndex++; break; } } private void Update() { if (Input.GetKeyDown("r")) { GameManager.ProcessMgr.CheckSubProcessSteps(2); } } private void OnMouseExit() { } private void OnDestroy() { GameManager.EventMgr.RemoveEventListener(Enum_EventType.SwitchSubProcess, SwitchSubProcess); } }