60 lines
1.4 KiB
C#
60 lines
1.4 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// 场景触发器
|
|
/// </summary>
|
|
public class DeviceTrigger : PermanentTriggerBase
|
|
{
|
|
/// <summary>
|
|
/// 安装位置
|
|
/// </summary>
|
|
public Transform installVector;
|
|
/// <summary>
|
|
/// 点击回调
|
|
/// </summary>
|
|
public Action clickAction;
|
|
|
|
protected override void OnMDown()
|
|
{
|
|
base.OnMDown();
|
|
clickAction?.Invoke();
|
|
base.CallScoreAction();
|
|
}
|
|
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);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 不需要
|
|
/// </summary>
|
|
/// <param name="triggerInfo"></param>
|
|
/// <exception cref="NotImplementedException"></exception>
|
|
public override void LoadCurrentTriggerStat(string triggerInfo)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public override string SaveCurrentTriggerStat()
|
|
{
|
|
return "";
|
|
//throw new NotImplementedException();
|
|
}
|
|
}
|