comment pass
This commit is contained in:
@@ -10,12 +10,16 @@ using LogType = EscapeRoomEngine.Engine.Runtime.Utilities.LogType;
|
||||
|
||||
namespace EscapeRoomEngine.Desert.Runtime.Puzzle_A
|
||||
{
|
||||
/// <summary>
|
||||
/// The main component for the terminal module.
|
||||
/// </summary>
|
||||
[RequireComponent(typeof(Animator))]
|
||||
public class Terminal : CyclicStepPuzzle
|
||||
{
|
||||
private static readonly int LightFlash = Animator.StringToHash("Light Flash");
|
||||
|
||||
[BoxGroup("Internal")] [Required] public Emission terminalLight;
|
||||
[BoxGroup("Internal")] [Required]
|
||||
public Emission terminalLight;
|
||||
[BoxGroup("Internal")]
|
||||
[ValidateInput("SymbolCount", "Must have same amount of symbols and slots.")]
|
||||
public List<SymbolButton> symbols;
|
||||
@@ -82,6 +86,7 @@ namespace EscapeRoomEngine.Desert.Runtime.Puzzle_A
|
||||
{
|
||||
base.SetModule(module);
|
||||
|
||||
// The terminal requires a related symbol ball module
|
||||
var firstRelatedModule = Module.relatedModules[0];
|
||||
if (firstRelatedModule.State is Ball ball)
|
||||
{
|
||||
@@ -95,15 +100,15 @@ namespace EscapeRoomEngine.Desert.Runtime.Puzzle_A
|
||||
TurnOnLights();
|
||||
}
|
||||
|
||||
// required in animation
|
||||
[UsedImplicitly] internal void TurnOnLights()
|
||||
[UsedImplicitly] // required in animation
|
||||
internal void TurnOnLights()
|
||||
{
|
||||
terminalLight.active = true;
|
||||
_ball.StatusLight = true;
|
||||
}
|
||||
|
||||
// required in animation
|
||||
[UsedImplicitly] internal void TurnOffLights()
|
||||
[UsedImplicitly] // required in animation
|
||||
internal void TurnOffLights()
|
||||
{
|
||||
terminalLight.active = false;
|
||||
_ball.StatusLight = false;
|
||||
@@ -131,12 +136,19 @@ namespace EscapeRoomEngine.Desert.Runtime.Puzzle_A
|
||||
|
||||
#region Debug Buttons
|
||||
|
||||
[Button(enabledMode: EButtonEnableMode.Playmode)] public void PressSymbol0() => PressedSymbol(0);
|
||||
[Button(enabledMode: EButtonEnableMode.Playmode)] public void PressSymbol1() => PressedSymbol(1);
|
||||
[Button(enabledMode: EButtonEnableMode.Playmode)] public void PressSymbol2() => PressedSymbol(2);
|
||||
[UsedImplicitly]
|
||||
[Button(enabledMode: EButtonEnableMode.Playmode)]
|
||||
public void PressSymbol0() => PressedSymbol(0);
|
||||
[UsedImplicitly]
|
||||
[Button(enabledMode: EButtonEnableMode.Playmode)]
|
||||
public void PressSymbol1() => PressedSymbol(1);
|
||||
[UsedImplicitly]
|
||||
[Button(enabledMode: EButtonEnableMode.Playmode)]
|
||||
public void PressSymbol2() => PressedSymbol(2);
|
||||
|
||||
#endregion
|
||||
|
||||
[UsedImplicitly] private bool SymbolCount(List<SymbolButton> list) => list.Count == symbolSlots.Count;
|
||||
[UsedImplicitly] // used for field validation
|
||||
private bool SymbolCount(List<SymbolButton> list) => list.Count == symbolSlots.Count;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user