laser emitter module
This commit is contained in:
18
Assets/Station46/Modules/Laser/Scripts/LaserButtonEmitter.cs
Normal file
18
Assets/Station46/Modules/Laser/Scripts/LaserButtonEmitter.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using NaughtyAttributes;
|
||||
using Station46.Scripts;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Station46.Modules.Laser.Scripts
|
||||
{
|
||||
public class LaserButtonEmitter : LaserEmitter
|
||||
{
|
||||
[BoxGroup("Internal")] [SerializeField] private Button button;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
button.ButtonEvent += (_, type) => laser.firing = type == ButtonEventType.Pressed;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user