AreaGenerationLibrary.LayoutManager
ApartmentLayout
, BoxCityLayout
, CrossLayout
, GridCityLayout
, MazeLayout
, TreeLayout
public abstract class AbstractLayout extends java.lang.Object implements AreaGenerationLibrary.LayoutManager
Constructor | Description |
---|---|
AbstractLayout() |
Modifier and Type | Method | Description |
---|---|---|
int |
diff(int width,
int height,
int num) |
|
abstract java.util.List<AreaGenerationLibrary.LayoutNode> |
generate(int num,
int dir) |
Generates a list of layout nodes, each
of which reprents a single room in the area.
|
static int |
getDirection(AreaGenerationLibrary.LayoutNode from,
AreaGenerationLibrary.LayoutNode to) |
|
static AreaGenerationLibrary.LayoutRuns |
getRunDirection(int dirCode) |
|
abstract java.lang.String |
name() |
The name of the layout manager
|
public int diff(int width, int height, int num)
public abstract java.lang.String name()
AreaGenerationLibrary.LayoutManager
name
in interface AreaGenerationLibrary.LayoutManager
public abstract java.util.List<AreaGenerationLibrary.LayoutNode> generate(int num, int dir)
AreaGenerationLibrary.LayoutManager
generate
in interface AreaGenerationLibrary.LayoutManager
num
- the number of nodes to generatedir
- the direction of entry into this group of nodes.AreaGenerationLibrary.LayoutNode
public static int getDirection(AreaGenerationLibrary.LayoutNode from, AreaGenerationLibrary.LayoutNode to)
public static AreaGenerationLibrary.LayoutRuns getRunDirection(int dirCode)