laser sink puzzle module
This commit is contained in:
22
Assets/Station46/Modules/Laser/Scripts/LaserPuzzleSink.cs
Normal file
22
Assets/Station46/Modules/Laser/Scripts/LaserPuzzleSink.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
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);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user