laser sink
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using NaughtyAttributes;
|
||||
using Station46.Scripts;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user