YanCheng_Metrology/Assets/Scripts/CXX/Devices/Device_Base.cs

48 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Device_Base : PermanentTriggerBase
{
/// <summary>
/// É豸ÀàÐÍ
/// </summary>
public DeviceType deviceType;
/// <summary>
/// trigger´¥·¢Ê¼þ
/// </summary>
public Func<string,bool,int> triggerAction;
protected override void OnStart()
{
if ( GameManager.RunModelMgr.SceneType == E_SceneType.Site)
{
base.OnStart();
AddTriggerAction(GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID);
}
}
protected override void OnMEnter()
{
if ( GameManager.RunModelMgr.SceneType == E_SceneType.Site && GameManager.RunModelMgr.ModeType != E_ModeType.Study)
{
base.OnMEnter();
_highlight.SetHighlighted(true);
}
}
protected override void OnMExit()
{
if (GameManager.RunModelMgr.SceneType == E_SceneType.Site && GameManager.RunModelMgr.ModeType != E_ModeType.Study)
{
base.OnMExit();
_highlight.SetHighlighted(false);
}
}
public void AddTriggerAction(Func<string, bool, int> action)
{
this.triggerAction = action;
}
}