comment pass

This commit is contained in:
2022-12-29 16:16:49 +01:00
parent 643e03192a
commit ff01a700bd
75 changed files with 634 additions and 65 deletions

View File

@@ -16,8 +16,12 @@ namespace EscapeRoomEngine.Desert.Runtime.Puzzle_B
public List<int> stateIndices;
}
/// <summary>
/// The main component for the hexagon module.
/// </summary>
public class PuzzleB : StatePuzzle
{
[Tooltip("How many seconds the buttons should be disabled until another input is accepted.")]
[SerializeField] [Min(0)]
private float buttonCooldown;
[ValidateInput("CorrectRotatorCount")]
@@ -86,6 +90,9 @@ namespace EscapeRoomEngine.Desert.Runtime.Puzzle_B
}
}
/// <summary>
/// Switch all rotators specified by a given action.
/// </summary>
private void Switch(ButtonAction action)
{
for (var i = 0; i < action.stateIndices.Count; i++)
@@ -99,7 +106,7 @@ namespace EscapeRoomEngine.Desert.Runtime.Puzzle_B
}
}
[UsedImplicitly]
[UsedImplicitly] // used for field validation
private bool CorrectRotatorCount(List<Rotator> list) => list != null && list.Count == stateCount;
}
}