generic doors
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Escape_Room_Engine.Engine.Scripts.Modules
|
||||
{
|
||||
@@ -7,14 +8,15 @@ namespace Escape_Room_Engine.Engine.Scripts.Modules
|
||||
Entrance = ModuleType.DoorEntrance, Exit = ModuleType.DoorExit
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DoorModule : Module
|
||||
{
|
||||
public bool IsEntrance => IsType((ModuleType)DoorType.Entrance);
|
||||
public bool IsExit => IsType((ModuleType)DoorType.Exit);
|
||||
|
||||
internal DoorModule(DoorType type, Space space) : base(space)
|
||||
internal DoorModule(Space space, DoorModuleDescription description) : base(space, description)
|
||||
{
|
||||
types.Add((ModuleType)type);
|
||||
_description.types.Add((ModuleType)description.doorType);
|
||||
srDimensions.Size = Vector2Int.one; // door always has size 1x1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user