LockOrientation requirement

This commit is contained in:
2022-11-24 19:25:54 +01:00
parent 3e51410ade
commit a97f2a6c5d
12 changed files with 120 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
using System.Collections.Generic;
using EscapeRoomEngine.Engine.Runtime.Modules;
using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Requirements
{
[CreateAssetMenu(menuName = "Requirements/Lock Orientation")]
public class LockOrientation : PlacementRequirement
{
public Orientation orientation;
protected override List<Placement> FilterCandidates(List<Placement> candidates, Module module, Space space)
{
candidates.RemoveAll(candidate => candidate.orientation != orientation);
return candidates;
}
}
}