81 lines
2.1 KiB
C#
81 lines
2.1 KiB
C#
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<int> subProcessStepID = new List<int>();
|
|
private void Awake()
|
|
{
|
|
subProcessStepID = GameManager.DataMgr.GetSubProcessStepIDByToolID(modelID);
|
|
}
|
|
private void Start()
|
|
{
|
|
GameManager.EventMgr.AddEventListener<int>(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<int>(Enum_EventType.SwitchSubProcess, SwitchSubProcess);
|
|
}
|
|
}
|