Show / Hide Table of Contents

Class LayoutGrid2D<TRoom>

Represents a final layout produced by the generator.

Inheritance
System.Object
LayoutGrid2D<TRoom>
Namespace: Edgar.GraphBasedGenerator.Grid2D
Assembly: Edgar.dll
Syntax
public class LayoutGrid2D<TRoom> : Object
Type Parameters
Name Description
TRoom

Constructors

LayoutGrid2D(List<LayoutRoomGrid2D<TRoom>>)

Declaration
public LayoutGrid2D(List<LayoutRoomGrid2D<TRoom>> rooms)
Parameters
Type Name Description
System.Collections.Generic.List<LayoutRoomGrid2D<TRoom>> rooms

See the Rooms property.

Properties

Rooms

List of rooms in the level.

Declaration
public List<LayoutRoomGrid2D<TRoom>> Rooms { get; }
Property Value
Type Description
System.Collections.Generic.List<LayoutRoomGrid2D<TRoom>>

Methods

LoadFromJson(String)

Loads a layout from a given JSON file.

Declaration
public static LayoutGrid2D<TRoom> LoadFromJson(string filename)
Parameters
Type Name Description
System.String filename

Path to the JSON file.

Returns
Type Description
LayoutGrid2D<TRoom>

SaveToJson(String, Boolean)

Saves the layout to a JSON file.

Declaration
public void SaveToJson(string filename, bool preserveReferences = true)
Parameters
Type Name Description
System.String filename

Path to the JSON file.

System.Boolean preserveReferences

Whether to preserve references to objects.

Back to top Generated by DocFX