Class ResourceBundle
- All Implemented Interfaces:
Serializable
Represents a resource bundle that can be serialized. This class is used to manage various game resources such as maps, sprite sheets, tilesets,
emitters, blueprints, and sounds.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the list of blueprints in this resource bundle.Gets the list of emitters in this resource bundle.Gets reusable script bindings that apply to entity project types.Gets scripts attached to the game lifecycle.getMaps()Gets the list of maps in this resource bundle.Gets reusable Java and runtime script definitions.Gets the list of sounds in this resource bundle.Gets the list of sprite sheets in this resource bundle.Gets the list of tilesets in this resource bundle.static ResourceBundleLoads a ResourceBundle from a string file path (convenience overload).static ResourceBundleLoads a ResourceBundle from a URL (convenience overload).static ResourceBundleLoads a ResourceBundle from a Path.Saves the ResourceBundle to a file.
-
Field Details
-
FILE_EXTENSION
- See Also:
-
CURRENT_VERSION
public static final float CURRENT_VERSION- See Also:
-
-
Constructor Details
-
ResourceBundle
public ResourceBundle()Constructs a new ResourceBundle instance. Initializes the lists for sprite sheets, maps, tilesets, emitters, blueprints, and sounds.
-
-
Method Details
-
load
Loads a ResourceBundle from a Path.- Parameters:
filePath- The Path to load the ResourceBundle from.- Returns:
- The loaded ResourceBundle, or null if loading fails.
-
load
Loads a ResourceBundle from a string file path (convenience overload).- Parameters:
filePath- The file path as a string to load the ResourceBundle from.- Returns:
- The loaded ResourceBundle, or null if loading fails.
-
load
Loads a ResourceBundle from a URL (convenience overload). This method uses the Resources utility to resolve the URL and then delegates to the Path-based method.- Parameters:
fileUrl- The URL to load the ResourceBundle from.- Returns:
- The loaded ResourceBundle, or null if loading fails.
-
getMaps
-
getSpriteSheets
Gets the list of sprite sheets in this resource bundle.- Returns:
- The list of sprite sheets.
-
getTilesets
-
getEmitters
Gets the list of emitters in this resource bundle.- Returns:
- The list of emitters.
-
getBluePrints
-
getScripts
Gets reusable Java and runtime script definitions. -
getGameScripts
Gets scripts attached to the game lifecycle. -
getEntityScripts
Gets reusable script bindings that apply to entity project types. -
getSounds
Gets the list of sounds in this resource bundle.- Returns:
- The list of sounds.
-
save
-