Class RoomTemplateLoaderGrid2D
Class used to convert room templates to the representation used in the dungeon generator library.
Inheritance
System.Object
RoomTemplateLoaderGrid2D
Assembly: cs.temp.dll.dll
Syntax
public static class RoomTemplateLoaderGrid2D
Methods
GetPolygonFromRoomTemplate(GameObject)
Computes a polygon from points on given tilemaps.
Declaration
public static PolygonGrid2D GetPolygonFromRoomTemplate(GameObject roomTemplate)
Parameters
Type |
Name |
Description |
GameObject |
roomTemplate |
|
Returns
Type |
Description |
PolygonGrid2D |
|
GetPolygonFromTilemaps(ICollection<Tilemap>)
Computes a polygon from points on given tilemaps.
Declaration
public static PolygonGrid2D GetPolygonFromTilemaps(ICollection<Tilemap> tilemaps)
Parameters
Type |
Name |
Description |
System.Collections.Generic.ICollection<Tilemap> |
tilemaps |
|
Returns
Type |
Description |
PolygonGrid2D |
|
GetPolygonFromTiles(HashSet<Vector3Int>)
Computes a polygon from its tiles.
Declaration
public static PolygonGrid2D GetPolygonFromTiles(HashSet<Vector3Int> allPoints)
Parameters
Type |
Name |
Description |
HashSet<Vector3Int> |
allPoints |
|
Returns
Type |
Description |
PolygonGrid2D |
|
GetUsedTiles(IEnumerable<Tilemap>)
Gets all tiles that are not null in given tilemaps.
Declaration
public static HashSet<Vector3Int> GetUsedTiles(IEnumerable<Tilemap> tilemaps)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<Tilemap> |
tilemaps |
|
Returns
Type |
Description |
HashSet<Vector3Int> |
|
IsClockwiseOriented(IList<EdgarVector2Int>)
Declaration
public static bool IsClockwiseOriented(IList<EdgarVector2Int> points)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IList<EdgarVector2Int> |
points |
|
Returns
Type |
Description |
System.Boolean |
|
TryGetRoomTemplate(GameObject, out RoomTemplateGrid2D, out ActionResult)
Computes a room room template from a given room template game object.
Declaration
public static bool TryGetRoomTemplate(GameObject roomTemplatePrefab, out RoomTemplateGrid2D roomTemplate, out ActionResult result)
Parameters
Type |
Name |
Description |
GameObject |
roomTemplatePrefab |
|
RoomTemplateGrid2D |
roomTemplate |
|
ActionResult |
result |
|
Returns
Type |
Description |
System.Boolean |
|