move puzzle implementations out of engine

This commit is contained in:
2023-03-22 09:44:17 +01:00
parent e1bfecbd4b
commit 30d8f986df
70 changed files with 82 additions and 46 deletions

View File

@@ -0,0 +1,28 @@
using System.Collections.Generic;
using EscapeRoomEngine.Engine.Runtime.Modules.State;
using EscapeRoomEngine.Engine.Runtime.Requirements;
using NaughtyAttributes;
using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Modules.Description
{
/// <summary>
/// The description of a specific module variant. Includes any requirements, the types and the module state that should be initialised with the module.
/// </summary>
[CreateAssetMenu(menuName = "Modules/Generic Module")]
public class ModuleDescription : ScriptableObject
{
[Tooltip("The module types decide how this module can be used.")]
public List<ModuleType> types = new();
public ModuleState modulePrefab;
[BoxGroup("Requirements")]
public List<PreconditionRequirement> preconditionRequirements = new();
[BoxGroup("Requirements")]
public List<PlacementRequirement> placementRequirements = new();
internal bool HasType(ModuleType type)
{
return types.Contains(type);
}
}
}