SpriteImage<T> class

One image, drawn whole.

final logo = SpriteImage('assets/logo.png');
Inheritance

Constructors

SpriteImage(String asset, {T? key})
Draws the image cached at asset whole.
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 index of row is held, in seconds.
override
frames(int _) int
How many frames row plays.
override
image(int _) Image
The image row is drawn from.
override
loops(int _) bool
Whether row starts 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 index of row sits in image.
override
reload() SpriteImage<T>
Re-resolves this sprite against Ignis.cache.
override
rowOf(T key) int?
The row key names, 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