laser sink

This commit is contained in:
2023-04-25 19:42:08 +02:00
parent 064470be4d
commit f16b026404
25 changed files with 1179 additions and 108 deletions

View File

@@ -1,4 +1,3 @@
using System;
using NaughtyAttributes;
using Station46.Scripts;
using UnityEngine;

View File

@@ -1,4 +1,6 @@
using Station46.Scripts;
using EscapeRoomEngine.Engine.Runtime.Modules.State;
using NaughtyAttributes;
using Station46.Scripts;
using UnityEngine;
namespace Station46.Modules.Laser.Scripts
@@ -6,10 +8,14 @@ namespace Station46.Modules.Laser.Scripts
[RequireComponent(typeof(LaserReceiver))]
public class LaserPuzzleSink : StatePuzzle
{
[BoxGroup("Internal")] [SerializeField] private Emission emission;
protected override void Start()
{
base.Start();
PuzzleEvent += (_, type) => emission.active = type == PuzzleEventType.Solved;
GetComponent<LaserReceiver>().LaserEvent += (_, type) =>
{
if (type == LaserEventType.Hit)