laser sink puzzle module

This commit is contained in:
2023-04-06 15:48:00 +02:00
parent cb54ebab05
commit b96b47f963
9 changed files with 113 additions and 31 deletions

View 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);
}
};
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 7c79e4aaf4964939bf62ead988ce66fa
timeCreated: 1683677446