comment pass
This commit is contained in:
@@ -9,13 +9,22 @@ namespace EscapeRoomEngine.Engine.Runtime.Modules
|
||||
Entrance = ModuleType.DoorEntrance, Exit = ModuleType.DoorExit
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The main component of any door module.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DoorModule : Module
|
||||
{
|
||||
public bool IsEntrance => IsType((ModuleType)DoorType.Entrance);
|
||||
public bool IsExit => IsType((ModuleType)DoorType.Exit);
|
||||
|
||||
/// <summary>
|
||||
/// The module state of this door as a <see cref="DoorState"/>.
|
||||
/// </summary>
|
||||
public DoorState DoorState => DoorState.FromState(State);
|
||||
/// <summary>
|
||||
/// The module state of the connected door as a <see cref="DoorState"/>.
|
||||
/// </summary>
|
||||
public DoorState ConnectedDoorState => Passage.Other(this).DoorState;
|
||||
|
||||
/// <summary>
|
||||
@@ -47,6 +56,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Modules
|
||||
{
|
||||
base.InstantiateModule(parent);
|
||||
|
||||
// the room needs to know about this door
|
||||
space.room.AddDoor(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user