Show / Hide Table of Contents

Class DoorInstanceGrid2D

Class containing information about a door of a room.

Inheritance
System.Object
DoorInstanceGrid2D
Namespace: Edgar.Unity
Assembly: cs.temp.dll.dll
Syntax
public class DoorInstanceGrid2D

Constructors

DoorInstanceGrid2D(OrthogonalLine, Vector2Int, RoomBase, RoomInstanceGrid2D, DoorSocketBase, DoorDirection)

Declaration
public DoorInstanceGrid2D(OrthogonalLine doorLine, Vector2Int facingDirection, RoomBase connectedRoom, RoomInstanceGrid2D connectedRoomInstance, DoorSocketBase socket, DoorDirection direction)
Parameters
Type Name Description
OrthogonalLine doorLine
Vector2Int facingDirection
RoomBase connectedRoom
RoomInstanceGrid2D connectedRoomInstance
DoorSocketBase socket
DoorDirection direction

Properties

ConnectedRoom

To which room is the room that contains this door connected.

Declaration
public RoomBase ConnectedRoom { get; }
Property Value
Type Description
RoomBase

ConnectedRoomInstance

To which room instance is the room that contains this door connected.

Declaration
public RoomInstanceGrid2D ConnectedRoomInstance { get; }
Property Value
Type Description
RoomInstanceGrid2D
Remarks

This property is not serialized. Unfortunately, object in Unity are serialized by value and that would make Unity try to serialize the whole graph.

Direction

Direction of the door.

Declaration
public DoorDirection Direction { get; }
Property Value
Type Description
DoorDirection

DoorLine

Line containing all points of the door. The line is in the local coordinates relative to the room template prefab.

Declaration
public OrthogonalLine DoorLine { get; }
Property Value
Type Description
OrthogonalLine

FacingDirection

Direction in which a room is connected to this door.

Declaration
public Vector2Int FacingDirection { get; }
Property Value
Type Description
Vector2Int
Remarks

Imagine that we have the following room shape and that "OO" represents a door. ----OO--- | | | |

Then the facing direction of the door above is equal to Vector2Int.up.

| O | O

Here the facing direction is equal to Vector2Int.right.

IsHorizontal

Whether the door line is horizontal or vertical.

Declaration
public bool IsHorizontal { get; }
Property Value
Type Description
System.Boolean

Socket

Socket of the door. Null if there was not socket assigned.

Declaration
public DoorSocketBase Socket { get; }
Property Value
Type Description
DoorSocketBase
In This Article
Back to top Generated by DocFX