laser redirector group module

This commit is contained in:
2023-04-06 17:31:34 +02:00
parent b96b47f963
commit 3fd61039fb
15 changed files with 393 additions and 6 deletions

View File

@@ -3,14 +3,12 @@ using UnityEngine;
namespace Station46.Modules.Laser.Scripts
{
[RequireComponent(typeof(LaserReceiver))]
[SelectionBase]
public class LaserRedirector : Laser
{
private LaserReceiver _receiver;
private void Awake()
{
_receiver = GetComponent<LaserReceiver>();
_receiver.LaserEvent += (_, type) => firing = type == LaserEventType.Hit;
GetComponent<LaserReceiver>().LaserEvent += (_, type) => firing = type == LaserEventType.Hit;
}
}
}

View File

@@ -0,0 +1,10 @@
using EscapeRoomEngine.Engine.Runtime.Modules;
using EscapeRoomEngine.Engine.Runtime.Modules.State;
namespace Station46.Modules.Laser.Scripts
{
public class LaserRedirectorGroup : ModuleState
{
public override void SetModule(Module module) {}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 17682b8cd3b64531a43877f8a07ab954
timeCreated: 1683679238