Package level.tools

Class TileTextureFactory

java.lang.Object
level.tools.TileTextureFactory

public class TileTextureFactory extends Object
  • 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 for
      design - Design of the element
      layout - The level
      position - Position of the element.
      Returns:
      Path to texture
    • findTexturePath

      public static String findTexturePath(Tile element, Tile[][] layout)
      Checks which texture must be used for the passed tile based on the surrounding tiles.
      Parameters:
      element - Tile to check for
      layout - The level
      Returns:
      Path to texture
    • findTexturePath

      public static String findTexturePath(Tile element, Tile[][] layout, LevelElement elementType)
      Checks which texture must be used for the passed tile based on the surrounding tiles.
      Parameters:
      element - Tile to check for
      layout - The level
      elementType - The type ot the tile if different than the attribute
      Returns:
      Path to texture