BITFALL/Assets/WSM Game Studio/Train Controller_v3/Shared/Scripts/HonkZone_v3.cs

16 lines
340 B
C#

using UnityEngine;
namespace WSMGameStudio.RailroadSystem
{
public class HonkZone_v3 : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
{
ILocomotive locomotive = other.GetComponent<ILocomotive>();
if (locomotive != null)
locomotive.Honk();
}
}
}