ResourceManager class IO
Manages the loading of game resources such as textures, images, fonts, and sounds.
It automatically tracks loading progress.
Constructors
- ResourceManager(GL2 _gl, Audio _audio, Loader _loadingInfo)
- Creates a new ResourceManager.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
loadFont(
String path, double size, {bool antiAlias = true, String containedAsciiCharacters = BitmapFont.extendedAscii}) → BitmapFont - Loads a TrueType Font and creates BitmapFont out of it.
-
loadImage(
String path, {int frameWidth = 0, int frameHeight = 0, int paddingX = 0, int paddingY = 0, int textureFlags = TextureFlags.defaultFlags, double pivotX = 0.5, double pivotY = 0.5, void onLoad()?}) → Images -
Loads an image or a sequence of image frames (Images) from the given
path
. -
loadSound(
String path, {int retriggerDelayInMs = 0}) → Sound -
Loads a Sound from the audio file at the given
path
. -
loadString(
String path) → Future< String> -
Loads the content of a text file from the given
path
as a String. -
loadTexture(
String path, [int textureFlags = TextureFlags.defaultFlags]) → Texture -
Loads a Texture from the given
path
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited