ManiaMap.Godot
Procedural generation of metroidvania style maps for Godot .NET.
DoorNode2D Class Reference

A possible door location connecting two RoomNode2D. More...

Inheritance diagram for DoorNode2D:
CellChild2D IDoorNode ICellChild ICellChild

Public Member Functions

override void _EnterTree ()
 
override void _ExitTree ()
 
override void _Ready ()
 
override void AutoAssign (RoomNode2D room)
 Assigns the room and any auto assigned values to the object. More...
 
- Public Member Functions inherited from CellChild2D
override void _ValidateProperty (Godot.Collections.Dictionary property)
 

Static Public Member Functions

static DoorNode2D FindActiveDoor (Uid roomId, DoorConnection doorConnection)
 Returns the door in the scene with the matching room ID and door connection. More...
 

Properties

static Dictionary< Uid, LinkedList< DoorNode2D > > ActiveRoomDoors = new Dictionary<Uid, LinkedList<DoorNode2D>>() [get]
 A dictionary of doors in the scene by room ID. More...
 
bool AutoAssignDirection = true [getset]
 
int DoorCode [getset]
 
DoorConnection DoorConnection [getprivate set]
 
DoorDirection DoorDirection [getset]
 
DoorType DoorType [getset]
 
- Properties inherited from CellChild2D
bool AutoAssignCell = true [getset]
 
int Column [getset]
 
RoomNode2D Room [getset]
 The contained room. More...
 
IRoomNode RoomNode [get]
 
int Row [getset]
 
- Properties inherited from ICellChild
bool AutoAssignCell [get]
 If true, the cell row and column indices will be automatically assigned when auto assign is run. Disable this flag if you wish to control these values manually. More...
 
int Column [get]
 The cell column index. More...
 
IRoomNode RoomNode [get]
 The containing room node. More...
 
int Row [get]
 The cell row index. More...
 
- Properties inherited from IDoorNode
bool AutoAssignDirection [get]
 If true, auto assigns the door direction based on its position when auto assign is run. Disable this flag if you wish to control this value manually. More...
 
int DoorCode [get]
 The door code to which this door may connect. Door codes can connect if they intersect. More...
 
DoorConnection DoorConnection [get]
 The door's door and room connection information. More...
 
DoorDirection DoorDirection [get]
 The direction where the door leads relative to its containing cell. More...
 
DoorType DoorType [get]
 The door type. See the ManiaMap DoorType documentation for more information. More...
 

Private Member Functions

void AddToActiveRoomDoors ()
 Adds the door to the active room doors dictionary. More...
 
void RemoveFromActiveRoomDoors ()
 Removes the door from the active room doors dictionary. More...
 

Detailed Description

A possible door location connecting two RoomNode2D.

See IDoorNodeExtensions for additional methods usable by this class.

Definition at line 15 of file DoorNode2D.cs.

Member Function Documentation

◆ _EnterTree()

override void _EnterTree ( )

Definition at line 46 of file DoorNode2D.cs.

◆ _ExitTree()

override void _ExitTree ( )

Definition at line 54 of file DoorNode2D.cs.

◆ _Ready()

override void _Ready ( )

Definition at line 38 of file DoorNode2D.cs.

◆ AddToActiveRoomDoors()

void AddToActiveRoomDoors ( )
private

Adds the door to the active room doors dictionary.

Definition at line 74 of file DoorNode2D.cs.

◆ AutoAssign()

override void AutoAssign ( RoomNode2D  room)
virtual

Assigns the room and any auto assigned values to the object.

Reimplemented from CellChild2D.

Definition at line 63 of file DoorNode2D.cs.

◆ FindActiveDoor()

static DoorNode2D FindActiveDoor ( Uid  roomId,
DoorConnection  doorConnection 
)
static

Returns the door in the scene with the matching room ID and door connection.

Parameters
roomIdThe door's room ID.
doorConnectionThe door's connection.

Definition at line 114 of file DoorNode2D.cs.

◆ RemoveFromActiveRoomDoors()

void RemoveFromActiveRoomDoors ( )
private

Removes the door from the active room doors dictionary.

Definition at line 93 of file DoorNode2D.cs.

Property Documentation

◆ ActiveRoomDoors

Dictionary<Uid, LinkedList<DoorNode2D> > ActiveRoomDoors = new Dictionary<Uid, LinkedList<DoorNode2D>>()
staticgetprivate

A dictionary of doors in the scene by room ID.

Definition at line 20 of file DoorNode2D.cs.

◆ AutoAssignDirection

bool AutoAssignDirection = true
getset

Definition at line 23 of file DoorNode2D.cs.

◆ DoorCode

int DoorCode
getset

Definition at line 33 of file DoorNode2D.cs.

◆ DoorConnection

DoorConnection DoorConnection
getprivate set

Definition at line 36 of file DoorNode2D.cs.

◆ DoorDirection

DoorDirection DoorDirection
getset

Definition at line 26 of file DoorNode2D.cs.

◆ DoorType

DoorType DoorType
getset

Definition at line 29 of file DoorNode2D.cs.


The documentation for this class was generated from the following file: