fling holes puzzle
This commit is contained in:
@@ -16,14 +16,15 @@ namespace Station46.Modules.Holes.Scripts
|
||||
[BoxGroup("Internal")] [SerializeField]
|
||||
private Emission frameLight;
|
||||
|
||||
private List<Hole> _holes;
|
||||
protected List<Hole> holes;
|
||||
|
||||
private Dispenser.Scripts.Dispenser _dispenser;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
_holes = new List<Hole>(GetComponentsInChildren<Hole>());
|
||||
holes = new List<Hole>(GetComponentsInChildren<Hole>());
|
||||
}
|
||||
|
||||
protected override void Start()
|
||||
@@ -37,7 +38,7 @@ namespace Station46.Modules.Holes.Scripts
|
||||
{
|
||||
case PuzzleEventType.Restarted:
|
||||
var color = EscapeRoomEngine.Engine.Runtime.Engine.Theme.puzzleColor;
|
||||
_holes.ForEach(hole =>
|
||||
holes.ForEach(hole =>
|
||||
{
|
||||
hole.Enable();
|
||||
hole.Emission.color = color.hdr;
|
||||
@@ -48,7 +49,7 @@ namespace Station46.Modules.Holes.Scripts
|
||||
case PuzzleEventType.Solved:
|
||||
var solvedColor = EscapeRoomEngine.Engine.Runtime.Engine.Theme.solvedColor;
|
||||
var activeColor = EscapeRoomEngine.Engine.Runtime.Engine.Theme.activeColor;
|
||||
_holes.ForEach(hole =>
|
||||
holes.ForEach(hole =>
|
||||
{
|
||||
hole.Disable();
|
||||
hole.Emission.color = solution[hole.number] == 1 ? activeColor.hdr : solvedColor.hdr;
|
||||
@@ -59,7 +60,7 @@ namespace Station46.Modules.Holes.Scripts
|
||||
}
|
||||
};
|
||||
|
||||
_holes.ForEach(hole => hole.ButtonEvent += (_, type) =>
|
||||
holes.ForEach(hole => hole.ButtonEvent += (_, type) =>
|
||||
{
|
||||
// ReSharper disable once SwitchStatementMissingSomeEnumCasesNoDefault
|
||||
switch (type)
|
||||
|
||||
Reference in New Issue
Block a user