Enum Class TexturePack.Images
- All Implemented Interfaces:
Serializable,Comparable<TexturePack.Images>,Constable
- Enclosing class:
- TexturePack
This enum is for holding all the images used in the game.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe background image for the game.The image for the blue key.The image for the blueLock.The image for the coin.The image for the empty tile.The image for the enemy.The image for the exit.The image for the floor.The image for the green key.The image for the greenLock.The image for the hero.The image for the hero back.The image for the hero front.The image for the hero left.The image for the hero right.The image for the help tile.The image for the loose screen.The image for the orange key.The image for the orangeLock.The image for the repeatable pattern background.The image for the repeatable pattern background.The image for the pop-upThe image for the wall.The image for the win screen.The image for the yellow key.The image for the yellowLock. -
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImageget the image for the String provided.static BufferedImageget the image for the Tile provided.static BufferedImageget the image.getImg()get the image that is cashed.getName()get the name.static BufferedImageloadCustom(String path) load the image from the file.load the image from the disk.static voidreload all the images and caches them when changing texture packs.static TexturePack.ImagesReturns the enum constant of this class with the specified name.static TexturePack.Images[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Background
The background image for the game. -
Pattern
The image for the repeatable pattern background. -
Pattern_2
The image for the repeatable pattern background. -
Floor
The image for the floor. -
Hero
The image for the hero. -
Enemy
The image for the enemy. -
Coin
The image for the coin. -
BlueKey
The image for the blue key. -
GreenKey
The image for the green key. -
OrangeKey
The image for the orange key. -
YellowKey
The image for the yellow key. -
Empty_tile
The image for the empty tile. -
Wall
The image for the wall. -
BlueLock
The image for the blueLock. -
GreenLock
The image for the greenLock. -
OrangeLock
The image for the orangeLock. -
YellowLock
The image for the yellowLock. -
Exit
The image for the exit. -
WinScreen
The image for the win screen. -
LoseScreen
The image for the loose screen. -
InfoTile
The image for the help tile. -
HeroBack
The image for the hero back. -
HeroFront
The image for the hero front. -
HeroLeft
The image for the hero left. -
HeroRight
The image for the hero right. -
PopUp
The image for the pop-up
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getImage
get the image.- Parameters:
img- the image enum to extract the image from- Returns:
- BufferedImage
-
getImage
get the image for the Tile provided.- Parameters:
tile- the tile to extract the image from- Returns:
- BufferedImage
-
getImage
get the image for the String provided.- Parameters:
imgName- the name of the image to extract the image from- Returns:
- BufferedImage
-
loadCustom
load the image from the file.- Parameters:
path- the path of the image- Returns:
- BufferedImage
-
reloadAllTexturePack
public static void reloadAllTexturePack()reload all the images and caches them when changing texture packs. -
getName
get the name.- Returns:
- String
-
getImg
get the image that is cashed.- Returns:
- BufferedImage
-
loadImg
load the image from the disk.- Parameters:
imageName- the name of the image- Returns:
- BufferedImage
-