merge EmissionToggle and EmissionColor into one, deprecates RingLight
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Escape_Room_Engine.Desert.Scripts;
|
||||
using Escape_Room_Engine.Engine.Scripts.Modules;
|
||||
using NaughtyAttributes;
|
||||
using UnityEngine;
|
||||
@@ -10,7 +11,7 @@ namespace Escape_Room_Engine.Desert.Modules.Puzzle_A.Scripts
|
||||
{
|
||||
private static readonly int LightFlash = Animator.StringToHash("Light Flash");
|
||||
|
||||
[BoxGroup("Internal")] [Required] public RingLight ringLight;
|
||||
[BoxGroup("Internal")] [Required] public Emission ringLight;
|
||||
[BoxGroup("Internal")] [Required] public Ring ring;
|
||||
|
||||
private Animator _animator;
|
||||
@@ -32,11 +33,11 @@ namespace Escape_Room_Engine.Desert.Modules.Puzzle_A.Scripts
|
||||
break;
|
||||
case PuzzleEventType.Solved:
|
||||
ring.Solved = true;
|
||||
ringLight.Color = theme.solvedColor;
|
||||
ringLight.color = theme.solvedColor;
|
||||
TurnOnRingLight();
|
||||
break;
|
||||
case PuzzleEventType.WrongInput:
|
||||
ringLight.Color = theme.puzzleColor;
|
||||
ringLight.color = theme.puzzleColor;
|
||||
_animator.SetTrigger(LightFlash);
|
||||
break;
|
||||
default:
|
||||
@@ -47,12 +48,12 @@ namespace Escape_Room_Engine.Desert.Modules.Puzzle_A.Scripts
|
||||
|
||||
public void TurnOnRingLight()
|
||||
{
|
||||
ringLight.Active = true;
|
||||
ringLight.active = true;
|
||||
}
|
||||
|
||||
public void TurnOffRingLight()
|
||||
{
|
||||
ringLight.Active = false;
|
||||
ringLight.active = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user