comment pass
This commit is contained in:
@@ -11,9 +11,18 @@ using LogType = EscapeRoomEngine.Engine.Runtime.Utilities.LogType;
|
||||
|
||||
namespace EscapeRoomEngine.Engine.Runtime
|
||||
{
|
||||
/// <summary>
|
||||
/// The engine controls the whole escape room. It generates rooms and manages the puzzle plan.
|
||||
/// </summary>
|
||||
public class Engine : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// The active theme of the engine.
|
||||
/// </summary>
|
||||
public static EngineTheme Theme => Instance.theme;
|
||||
/// <summary>
|
||||
/// The active instance of the engine.
|
||||
/// </summary>
|
||||
public static Engine Instance { get; private set; }
|
||||
|
||||
public delegate void UpdateUIHandler();
|
||||
@@ -23,11 +32,16 @@ namespace EscapeRoomEngine.Engine.Runtime
|
||||
public int maxSpaceGenerationTries = 1000;
|
||||
[Tooltip("The engine will try to generate a room that takes approximately this many seconds to complete.")]
|
||||
public float initialTargetTime = 10 * 60;
|
||||
[Tooltip("The offset each room will have from the previous one.")]
|
||||
public Vector3 roomOffset = new(0, 1000, 0);
|
||||
[Tooltip("The theme of the engine that decides the available puzzles, doors and more.")]
|
||||
[Required] public EngineTheme theme;
|
||||
|
||||
public int NumberOfRooms => _rooms.Count;
|
||||
public IOption<Room> CurrentRoom => NumberOfRooms > 0 ? Some<Room>.Of(_rooms[^1]) : None<Room>.New();
|
||||
/// <summary>
|
||||
/// The currendly estimated time for the player to finish the experience.
|
||||
/// </summary>
|
||||
public float EstimatedTimeRemaining { get; private set; }
|
||||
|
||||
private readonly List<Room> _rooms = new();
|
||||
@@ -169,6 +183,10 @@ namespace EscapeRoomEngine.Engine.Runtime
|
||||
GameControl.Instance.PlannedPuzzles = _plannedPuzzles;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hide or destroy the room two rooms ago. The actual previous room is kept for the player to be able to backtrack one room.
|
||||
/// </summary>
|
||||
/// <param name="destroy"></param>
|
||||
public void HidePreviousRoom(bool destroy = true)
|
||||
{
|
||||
if (NumberOfRooms > 2)
|
||||
|
||||
Reference in New Issue
Block a user