change terminal light name to not override internal name

This commit is contained in:
2022-11-20 12:53:49 +01:00
parent 2d6c3b67fd
commit 70da016649
2 changed files with 7 additions and 7 deletions

View File

@@ -328,7 +328,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
theme: {fileID: 11400000, guid: 568d9a7d70f3edb4cb6db66a0010f105, type: 2} theme: {fileID: 11400000, guid: 568d9a7d70f3edb4cb6db66a0010f105, type: 2}
light: {fileID: 7019057833946340774} terminalLight: {fileID: 7019057833946340774}
symbols: symbols:
- {fileID: 7205539446313206328} - {fileID: 7205539446313206328}
- {fileID: 7137138753029999131} - {fileID: 7137138753029999131}

View File

@@ -11,7 +11,7 @@ namespace EscapeRoomEngine.Desert.Runtime.Puzzle_A
{ {
private static readonly int LightFlash = Animator.StringToHash("Light Flash"); private static readonly int LightFlash = Animator.StringToHash("Light Flash");
[BoxGroup("Internal")] [Required] public Emission light; [BoxGroup("Internal")] [Required] public Emission terminalLight;
[BoxGroup("Internal")] public List<SymbolButton> symbols; [BoxGroup("Internal")] public List<SymbolButton> symbols;
private Animator _animator; private Animator _animator;
@@ -28,15 +28,15 @@ namespace EscapeRoomEngine.Desert.Runtime.Puzzle_A
switch (type) switch (type)
{ {
case PuzzleEventType.Restarted: case PuzzleEventType.Restarted:
light.color = theme.puzzleColor; terminalLight.color = theme.puzzleColor;
symbols.ForEach(symbol => symbol.Enable()); symbols.ForEach(symbol => symbol.Enable());
break; break;
case PuzzleEventType.Solved: case PuzzleEventType.Solved:
light.color = theme.solvedColor; terminalLight.color = theme.solvedColor;
symbols.ForEach(symbol => symbol.Disable()); symbols.ForEach(symbol => symbol.Disable());
break; break;
case PuzzleEventType.WrongInput: case PuzzleEventType.WrongInput:
light.color = theme.puzzleColor; terminalLight.color = theme.puzzleColor;
_animator.SetTrigger(LightFlash); _animator.SetTrigger(LightFlash);
break; break;
default: default:
@@ -49,12 +49,12 @@ namespace EscapeRoomEngine.Desert.Runtime.Puzzle_A
public void TurnOnRingLight() public void TurnOnRingLight()
{ {
light.active = true; terminalLight.active = true;
} }
public void TurnOffRingLight() public void TurnOffRingLight()
{ {
light.active = false; terminalLight.active = false;
} }
} }
} }