orientation requirements
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Escape_Room_Engine.Engine.Scripts.Utilities;
|
||||
using UnityEngine;
|
||||
@@ -15,6 +16,11 @@ namespace Escape_Room_Engine.Engine.Scripts.Modules
|
||||
|
||||
public class Module
|
||||
{
|
||||
public static HashSet<Orientation> EveryOrientation => new(new[]
|
||||
{
|
||||
Orientation.North, Orientation.East, Orientation.South, Orientation.West
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// Get the space relative (<i>SR</i>) position of this module.
|
||||
/// </summary>
|
||||
@@ -67,6 +73,11 @@ namespace Escape_Room_Engine.Engine.Scripts.Modules
|
||||
Logger.Log($"{this} has been placed at {srPosition} (SR)", LogType.ModulePlacement);
|
||||
}
|
||||
|
||||
internal void Orient(Orientation o)
|
||||
{
|
||||
orientation = o;
|
||||
}
|
||||
|
||||
internal void InstantiateModule(Transform parent)
|
||||
{
|
||||
_moduleObject = new GameObject(ToString());
|
||||
@@ -79,7 +90,7 @@ namespace Escape_Room_Engine.Engine.Scripts.Modules
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Module ({string.Join(',', _description.types.ToList().ConvertAll(type => type.ToString()))})";
|
||||
return $"Module ({string.Join(", ", _description.types.ToList().ConvertAll(type => type.ToString()))})";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user