make sure every module is accessible
This commit is contained in:
@@ -35,13 +35,16 @@ namespace Escape_Room_Engine.Engine.Scripts
|
||||
|
||||
internal bool AddModuleWithRequirements(Module module)
|
||||
{
|
||||
var result =
|
||||
var requirementsFulfilled =
|
||||
PlacementRequirement.TryPlacing(module, this) &&
|
||||
OrientationRequirement.TryOrienting(module, this);
|
||||
|
||||
AddModule(module);
|
||||
|
||||
return result;
|
||||
|
||||
if (requirementsFulfilled)
|
||||
{
|
||||
AddModule(module);
|
||||
}
|
||||
|
||||
return requirementsFulfilled;
|
||||
}
|
||||
|
||||
internal void InstantiateSpace(Transform parent, string name)
|
||||
@@ -64,13 +67,11 @@ namespace Escape_Room_Engine.Engine.Scripts
|
||||
/// Convert a position relative to this space to one relative to the room.
|
||||
/// </summary>
|
||||
/// <param name="srPosition">The space relative (<i>SR</i>) position that should be converted to a room relative (<i>RR</i>) position.</param>
|
||||
/// <returns></returns>
|
||||
internal Vector2Int ToRoomRelative(Vector2Int srPosition) => srPosition + rrDimensions.Position;
|
||||
/// <summary>
|
||||
/// Convert a position relative to the room to one relative to this space.
|
||||
/// </summary>
|
||||
/// <param name="rrPosition">The room relative (<i>RR</i>) position that should be converted to a space relative (<i>SR</i>) position.</param>
|
||||
/// <returns></returns>
|
||||
internal Vector2Int ToSpaceRelative(Vector2Int rrPosition) => rrPosition - rrDimensions.Position;
|
||||
|
||||
private Mesh GenerateMesh()
|
||||
|
||||
Reference in New Issue
Block a user