Show / Hide Table of Contents

Class RoomInstanceGrid3D

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

Constructors

RoomInstanceGrid3D(RoomBase, Boolean, ConnectionBase, GameObject, GameObject, Vector3Int, Polygon2D)

Declaration
public RoomInstanceGrid3D(RoomBase room, bool isCorridor, ConnectionBase connection, GameObject roomTemplatePrefab, GameObject roomTemplateInstance, Vector3Int position, Polygon2D outlinePolygon)
Parameters
Type Name Description
RoomBase room
System.Boolean isCorridor
ConnectionBase connection
GameObject roomTemplatePrefab
GameObject roomTemplateInstance
Vector3Int position
Polygon2D outlinePolygon

Properties

Connection

If this is a corridor room, this property contains the corresponding connection. Otherwise it is null.

Declaration
public ConnectionBase Connection { get; }
Property Value
Type Description
ConnectionBase

DoorLines

Declaration
public List<DoorLineInfoGrid3D> DoorLines { get; }
Property Value
Type Description
System.Collections.Generic.List<DoorLineInfoGrid3D>

Doors

List of doors together with the information to which room they are connected.

Declaration
public List<DoorInstanceGrid3D> Doors { get; }
Property Value
Type Description
System.Collections.Generic.List<DoorInstanceGrid3D>

IsCorridor

Whether the room instance corresponds to a Room or to a Corridor.

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

OutlinePolygon

The polygon that was used as the outline of the room.

Declaration
public Polygon2D OutlinePolygon { get; }
Property Value
Type Description
Polygon2D
Remarks

The polygon is stored as a collection of points rather than tiles. The polygon is already correctly positioned, it is therefore not needed to add the position of the room to its points.

Position

Position of the room relative to the generated layout.

Declaration
public Vector3Int Position { get; }
Property Value
Type Description
Vector3Int

Room

The room associated with this room instance.

Declaration
public RoomBase Room { get; }
Property Value
Type Description
RoomBase
Remarks

The value may be null for rooms that were created on the fly (e.g. corridors) and were serialized and later deserialized, because Unity cannot serialize such ScriptableObjects outside of Unity without creating corresponding asset files.

RoomTemplateInstance

Instance of the RoomTemplatePrefab that is correctly positioned.

Declaration
public GameObject RoomTemplateInstance { get; }
Property Value
Type Description
GameObject
Remarks

This is a new instance of a corresponding room template. It is moved to a correct position and transformed/rotated.

RoomTemplatePrefab

Room template that was selected for a given room.

Declaration
public GameObject RoomTemplatePrefab { get; }
Property Value
Type Description
GameObject
Remarks

This is the original saved asset used in the level graph.

In This Article
Back to top Generated by DocFX