Package level.tools
Class TileTextureFactory
java.lang.Object
level.tools.TileTextureFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
findTexturePath
(Tile element, Tile[][] layout) Checks which texture must be used for the passed tile based on the surrounding tiles.static String
findTexturePath
(Tile element, Tile[][] layout, LevelElement elementType) Checks which texture must be used for the passed tile based on the surrounding tiles.static String
findTexturePath
(LevelElement element, DesignLabel design, LevelElement[][] layout, Coordinate position) Checks which texture must be used for the passed field based on the surrounding fields.
-
Constructor Details
-
TileTextureFactory
public TileTextureFactory()
-
-
Method Details
-
findTexturePath
public static String findTexturePath(LevelElement element, DesignLabel design, LevelElement[][] layout, Coordinate position) Checks which texture must be used for the passed field based on the surrounding fields.- Parameters:
element
- Element to check fordesign
- Design of the elementlayout
- The levelposition
- Position of the element.- Returns:
- Path to texture
-
findTexturePath
Checks which texture must be used for the passed tile based on the surrounding tiles.- Parameters:
element
- Tile to check forlayout
- The level- Returns:
- Path to texture
-
findTexturePath
Checks which texture must be used for the passed tile based on the surrounding tiles.- Parameters:
element
- Tile to check forlayout
- The levelelementType
- The type ot the tile if different than the attribute- Returns:
- Path to texture
-