![]() |
ManiaMap.Unity
Procedural generation of metroidvania style maps for Unity.
|
A component representing a possible door location. More...
Public Member Functions | |
override void | AutoAssign (RoomComponent room) |
Auto assigns elements to the door. More... | |
bool | DoorExists () |
True if the door exists in the layout. More... | |
Door | GetMMDoor () |
Returns the Mania Map door used by the procedural generator. More... | |
Uid | ToRoomId () |
The room ID of the room this door connects to. More... | |
Static Public Member Functions | |
static DoorComponent | FindDoor (Uid roomId, DoorConnection connection) |
Finds the door with the specified room ID and door connection. Returns null if the door is not found. More... | |
Protected Member Functions | |
override void | Initialize () |
Initializes the object. More... | |
override void | OnDestroy () |
![]() | |
virtual void | Awake () |
Properties | |
static Dictionary< Uid, LinkedList< DoorComponent > > | ActiveDoorsByRoom = new Dictionary<Uid, LinkedList<DoorComponent>>() [get] |
A dictionary of door components in the scene by their room ID. More... | |
bool | AutoAssignDirection [getset] |
If true, the door direction will be automatically assigned to the cell when update and save operations are performed. More... | |
DoorCode | Code [getset] |
The door code. More... | |
DoorConnection | Connection [getprivate set] |
The associated door connection in the layout. More... | |
DoorDirection | Direction [getset] |
The door direction. More... | |
DoorType | Type [getset] |
The door type. More... | |
![]() | |
bool | AutoAssignCell [getset] |
If true, the cell will be automatically assigned to the closest cell when update and save operations are performed. More... | |
Vector2Int | CellIndex [getset] |
The containing cell index. More... | |
int | Column [getset] |
The column index. More... | |
bool | IsInitialized [getprotected set] |
True if the object has been initialized. More... | |
UnityEvent | OnInitialize [getset] |
The event invoked after the object is initialized. More... | |
RoomComponent | Room [getset] |
The containing room. More... | |
int | Row [getset] |
The row index. More... | |
Private Member Functions | |
void | AddToActiveDoors () |
Adds the door to the doors dictionary. More... | |
DoorConnection | FindDoorConnection () |
Returns the door connection in the layout associated with the door. Returns null if the door connection does not exist in the layout. More... | |
void | RemoveFromActiveDoors () |
Removes the door from the doors dictionary. More... | |
Private Attributes | |
bool | _autoAssignDirection = true |
DoorCode | _code |
DoorDirection | _direction |
DoorType | _type |
Additional Inherited Members | |
![]() | |
bool | _autoAssignCell = true |
Vector2Int | _cellIndex |
RoomComponent | _room |
A component representing a possible door location.
Definition at line 11 of file DoorComponent.cs.
|
private |
Adds the door to the doors dictionary.
Definition at line 113 of file DoorComponent.cs.
|
virtual |
Auto assigns elements to the door.
Reimplemented from CellChild.
Definition at line 149 of file DoorComponent.cs.
bool DoorExists | ( | ) |
True if the door exists in the layout.
Definition at line 56 of file DoorComponent.cs.
|
static |
Finds the door with the specified room ID and door connection. Returns null if the door is not found.
roomId | The room ID. |
connection | The door connection. |
Definition at line 96 of file DoorComponent.cs.
|
private |
Returns the door connection in the layout associated with the door. Returns null if the door connection does not exist in the layout.
Definition at line 139 of file DoorComponent.cs.
Door GetMMDoor | ( | ) |
Returns the Mania Map door used by the procedural generator.
Definition at line 160 of file DoorComponent.cs.
|
protectedvirtual |
Initializes the object.
Reimplemented from CellChild.
Definition at line 79 of file DoorComponent.cs.
|
protectedvirtual |
Reimplemented from CellChild.
Definition at line 72 of file DoorComponent.cs.
|
private |
Removes the door from the doors dictionary.
Definition at line 129 of file DoorComponent.cs.
Uid ToRoomId | ( | ) |
The room ID of the room this door connects to.
Definition at line 64 of file DoorComponent.cs.
|
private |
Definition at line 20 of file DoorComponent.cs.
|
private |
Definition at line 42 of file DoorComponent.cs.
|
private |
Definition at line 28 of file DoorComponent.cs.
|
private |
Definition at line 35 of file DoorComponent.cs.
|
staticgetprivate |
A dictionary of door components in the scene by their room ID.
Definition at line 16 of file DoorComponent.cs.
|
getset |
If true, the door direction will be automatically assigned to the cell when update and save operations are performed.
Definition at line 25 of file DoorComponent.cs.
|
getset |
The door code.
Definition at line 46 of file DoorComponent.cs.
|
getprivate set |
The associated door connection in the layout.
Definition at line 51 of file DoorComponent.cs.
|
getset |
The door direction.
Definition at line 32 of file DoorComponent.cs.
|
getset |
The door type.
Definition at line 39 of file DoorComponent.cs.