C# Class TileGenerator.TileRectangleCombiner

Combines Tile Rectangles into 2x2, 2x1, 1x2, and 1x1 rectangles
Exibir arquivo Open project: Jewelots/Spelunky-Tiles

Public Methods

Method Description
Combine ( TileManager tileManager ) : List

Private Methods

Method Description
CheckFor1x2 ( int x, int y, int>.List &checkedList, TileManager tileManager ) : bool

Check if a 1x2 chunk would fit

CheckFor2x1 ( int x, int y, int>.List &checkedList, TileManager tileManager ) : bool

Check if a 2x1 chunk would fit

CheckFor2x2 ( int x, int y, int>.List &checkedList, TileManager tileManager ) : bool

Check if a 2x2 chunk would fit

Create1x2 ( int x, int y, List &tileRectList, int>.List &checkedList ) : void

Create a 1x2 chunk in a location

Create2x1 ( int x, int y, List &tileRectList, int>.List &checkedList ) : void

Create a 2x1 chunk in a location

Create2x2 ( int x, int y, List &tileRectList, int>.List &checkedList ) : void

Create a 2x2 chunk in a location

Create2x2Chunks ( List &tileRectList, int>.List &checkedList, TileManager tileManager ) : void

Find any 2x2 areas and attempts to merge them into chunks

CreateOtherChunks ( List &tileRectList, int>.List &checkedList, TileManager tileManager ) : void

Find any 2x1 or 1x2 areas and attempts to merge them into chunks

Generate1x1Chunks ( List &tileRectList, int>.List &checkedList, TileManager tileManager ) : void

Generate all remaining 1x1 areas

Method Details

Combine() public static method

public static Combine ( TileManager tileManager ) : List
tileManager TileManager
return List