Package visuals.imageServers
Class ImageCache
java.lang.Object
visuals.imageServers.ImageCache
Stores images for further use in ArrayLists.
Implemented as a singleton.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidLoads images used in the easy game mode to memory.voidLoads images used in the background of every game modevoidLoads images used in the hard game mode to memory.voidLoads images used in the medium game mode to memory.voidLoads images for the main menureturns images for the easy game modeBackground images specfic to easuy modereturns background images for gamemodesreturns images for the hard game modeBackground images specfic to hard modestatic ImageCacheReturns the instance of the class.returns images for the medium game modeBackground images specfic to medium modereturns images for the main menu
-
Field Details
-
instance
-
easyImageCache
-
mediumImageCache
-
hardImageCache
-
easyCompImages
-
mediumCompImages
-
hardCompImages
-
gameBackGroundImages
-
-
Constructor Details
-
ImageCache
private ImageCache()Constructor. Does nothing.
-
-
Method Details
-
getInstance
Returns the instance of the class.- Returns:
- instance of the class
-
addToEasyCache
public void addToEasyCache()Loads images used in the easy game mode to memory. -
addToMediumCache
public void addToMediumCache()Loads images used in the medium game mode to memory. -
addToHardCache
public void addToHardCache()Loads images used in the hard game mode to memory. -
addToGameBackGroundCache
public void addToGameBackGroundCache()Loads images used in the background of every game mode -
addToMenuCache
public void addToMenuCache()Loads images for the main menu -
getMenuCache
returns images for the main menu- Returns:
- arraylist of images
-
getGameBackGroundCache
returns background images for gamemodes- Returns:
- arraylist of images
-
getEasyCache
returns images for the easy game mode- Returns:
- arraylist of images
-
getMediumCache
returns images for the medium game mode- Returns:
- arraylist of images
-
getHardCache
returns images for the hard game mode- Returns:
- arraylist of images
-
getEasyComp
Background images specfic to easuy mode- Returns:
- arraylist of images
-
getMediumComp
Background images specfic to medium mode- Returns:
- arraylist of images
-
getHardComp
Background images specfic to hard mode- Returns:
- arraylist of images
-