DungeonRoom
namespace Griff.Modules.Dungeons;
public struct DungeonRoomA room of a DungeonGenerator’s dungeon: the cells of its floor, from its top-left cell.
Properties
Section titled “Properties”Center
Section titled “Center”public ValueTuple<int, int> Center { get; }The cell in its middle (the nearer the top left when it’s an even number of cells).
Height
Section titled “Height”public int Height { get; init; }public int Width { get; init; }public int X { get; init; }public int Y { get; init; }Methods
Section titled “Methods”Contains
Section titled “Contains”public bool Contains(int x, int y)True if cell (x, y) is on its floor.
Deconstruct
Section titled “Deconstruct”public void Deconstruct(out int X, out int Y, out int Width, out int Height)Equals
Section titled “Equals”public override bool Equals(object obj)Equals
Section titled “Equals”public bool Equals(DungeonRoom other)GetHashCode
Section titled “GetHashCode”public override int GetHashCode()Overlaps
Section titled “Overlaps”public bool Overlaps(DungeonRoom other, int margin = 0)True if it and other share a cell, or would with margin more cells round it.
ToString
Section titled “ToString”public override string ToString()