22 lines
509 B
C#
22 lines
509 B
C#
using Station46.Scripts;
|
|
using UnityEngine;
|
|
|
|
namespace Station46.Modules.Laser.Scripts
|
|
{
|
|
[RequireComponent(typeof(LaserReceiver))]
|
|
public class LaserPuzzleSink : StatePuzzle
|
|
{
|
|
protected override void Start()
|
|
{
|
|
base.Start();
|
|
|
|
GetComponent<LaserReceiver>().LaserEvent += (_, type) =>
|
|
{
|
|
if (type == LaserEventType.Hit)
|
|
{
|
|
SetState(0, 1, true);
|
|
}
|
|
};
|
|
}
|
|
}
|
|
} |