SpriteImage<T> class
One image, drawn whole.
final logo = SpriteImage('assets/logo.png');
Constructors
- SpriteImage(String asset, {T? key})
-
Draws the image cached at
assetwhole.factory
Properties
- asset → String
-
The cache key this was drawn from.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → T?
-
What its one row answers to in Sprite.rowOf, or null to go unnamed.
final
- rows → int
-
How many rows of frames this holds.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
duration(
int _, int _) → double -
How long frame
indexofrowis held, in seconds.override -
frames(
int _) → int -
How many frames
rowplays.override -
image(
int _) → Image -
The image
rowis drawn from.override -
loops(
int _) → bool -
Whether
rowstarts over after its last frame.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rect(
int _, int _) → Rect -
Where frame
indexofrowsits in image.override -
reload(
) → SpriteImage< T> -
Re-resolves this sprite against Ignis.cache.
override
-
rowOf(
T key) → int? -
The row
keynames, or null where nothing here answers to it.override -
size(
int _) → Vector2 -
The size of one frame of
row, which a SpriteNode takes as its own.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited