31 lines
670 B
C#
Raw Normal View History

2025-01-22 10:33:42 +08:00
using HighlightPlus;
using QFramework;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using static OperationController;
public class HighLightOnStepChanged : MonoBehaviour
{
private void Awake()
{
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
}
private void OnStepChanged(StepStatusOnChange change)
{
var effect = GetComponent<HighlightEffect>();
if (effect != null)
{
effect.highlighted = false;
}
}
private void OnDestroy()
{
TypeEventSystem.Global.UnRegister<StepStatusOnChange>(OnStepChanged);
}
}