comment pass

This commit is contained in:
2022-12-29 16:16:49 +01:00
parent 643e03192a
commit ff01a700bd
75 changed files with 634 additions and 65 deletions

View File

@@ -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);
}