using HighlightPlus; 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 HighlightEffect _highlight; private void Awake() { subProcessStepID = GameManager.DataMgr.GetSubProcessStepIDByToolID(modelID); _highlight = GetComponent(); } private void Start() { GameManager.EventMgr.AddEventListener(Enum_EventType.SwitchSubProcessStep, SwitchSubProcess); } private void SwitchSubProcess(int arg0) { if (subProcessStepID.Contains(arg0)) { _highlight.highlighted = true; Debug.Log("我应该提示"); } } private void OnMouseDown() { switch (downIndex) { case 0: if (GameManager.ProcessMgr.CheckSubProcessSteps(GameManager.ProcessMgr.subProcessStepId, modelID)) { _highlight.highlighted = false; } 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() { } private void OnMouseExit() { } private void OnDestroy() { GameManager.EventMgr.RemoveEventListener(Enum_EventType.SwitchSubProcessStep, SwitchSubProcess); } }