68 lines
2.1 KiB
C#
68 lines
2.1 KiB
C#
using System.Collections.Generic;
|
|
using EscapeRoomEngine.Engine.Runtime.Environment;
|
|
using EscapeRoomEngine.Engine.Runtime.Modules.Description;
|
|
using EscapeRoomEngine.Engine.Runtime.Modules.State;
|
|
using EscapeRoomEngine.Engine.Runtime.Utilities;
|
|
using JetBrains.Annotations;
|
|
using NaughtyAttributes;
|
|
using UnityEngine;
|
|
|
|
namespace EscapeRoomEngine.Engine.Runtime
|
|
{
|
|
/// <summary>
|
|
/// An engine theme decides the room size, look and available modules for the engine.
|
|
/// </summary>
|
|
[CreateAssetMenu(menuName = "Engine Theme")]
|
|
public class EngineTheme : ScriptableObject
|
|
{
|
|
#region Theme
|
|
|
|
[BoxGroup("Theme")]
|
|
public Intro intro;
|
|
|
|
[BoxGroup("Theme")]
|
|
public ModuleDescription endModule;
|
|
|
|
[BoxGroup("Theme")] [Required]
|
|
[Tooltip("The tile that rooms are generated from.")]
|
|
public SpaceTile spaceTile;
|
|
|
|
[BoxGroup("Theme")]
|
|
[Tooltip("The environments that are placed around generated rooms.")]
|
|
public List<RoomEnvironment> environments;
|
|
|
|
[BoxGroup("Theme")]
|
|
public DynamicColor puzzleColor, solvedColor, activeColor;
|
|
|
|
#endregion
|
|
|
|
#region Doors
|
|
|
|
[BoxGroup("Doors")] [Required]
|
|
public DoorModuleDescription spawnDoor;
|
|
|
|
[BoxGroup("Doors")] [Required]
|
|
public DoorModuleDescription introExitDoor;
|
|
|
|
[BoxGroup("Doors")] [ValidateInput("IsNotEmpty", "At least one exit door type is required.")]
|
|
[Tooltip("The types of exit doors this theme provides. Entrance doors are connected to the exit doors and don't need to be specified here.")]
|
|
public List<DoorModuleDescription> exitDoorTypes;
|
|
|
|
#endregion
|
|
|
|
#region Puzzles
|
|
|
|
[BoxGroup("Puzzles")] [MinMaxSlider(0, 24)]
|
|
public Vector2Int puzzleCount;
|
|
|
|
[BoxGroup("Puzzles")]
|
|
public List<PuzzleModuleDescription> puzzleTypes;
|
|
|
|
public PuzzleModuleDescription GetPuzzle(int id) => puzzleTypes.Find(puzzle => puzzle.Id == id);
|
|
|
|
#endregion
|
|
|
|
[UsedImplicitly]
|
|
private bool IsNotEmpty(List<DoorModuleDescription> modules) => modules.Count > 0;
|
|
}
|
|
} |