comment pass
This commit is contained in:
@@ -6,11 +6,20 @@ using UnityEngine;
|
||||
|
||||
namespace EscapeRoomEngine.Engine.Runtime.Modules
|
||||
{
|
||||
/// <summary>
|
||||
/// The <see cref="PuzzleState"/> of a puzzle that requires a specific state to be solved.
|
||||
/// </summary>
|
||||
public class StatePuzzle : PuzzleState
|
||||
{
|
||||
[Tooltip("The state this puzzle starts at.")]
|
||||
[BoxGroup("State Puzzle")]
|
||||
[SerializeField]
|
||||
protected List<int> states, solution;
|
||||
protected List<int> states;
|
||||
[Tooltip("The state that needs to be reached for this puzzle to be solved.")]
|
||||
[BoxGroup("State Puzzle")]
|
||||
[SerializeField]
|
||||
protected List<int> solution;
|
||||
[Tooltip("Set this to the total number of states this puzzle has.")]
|
||||
[BoxGroup("State Puzzle")]
|
||||
[SerializeField]
|
||||
[ValidateInput("CorrectStateCount", "States count must be equal to the number of states and the length of the solution.")]
|
||||
@@ -76,7 +85,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Modules
|
||||
}
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
[UsedImplicitly] // used for field validation
|
||||
private bool CorrectStateCount(int count) =>
|
||||
states != null && count == states.Count &&
|
||||
solution != null && count == solution.Count;
|
||||
|
||||
Reference in New Issue
Block a user