SpriteGroup class

Several Sprites laid end to end, addressed as one run of entries.

final slime = SpriteGroup([
  SpriteAnimation('assets/idle.png', .all(56), fps: 16),
  SpriteAnimation('assets/jump.png', .all(56), fps: 24),
]);

node.play(1);

Entries are numbered straight through: each part contributes as many as it holds, and the next carries on. Each part brings its own image, frame size, rates, and looping.

A SpriteMap is the same run of entries under names of your choosing.

Inheritance

Constructors

SpriteGroup(Iterable<Sprite<int>> parts)

Properties

entries ↔ List<SpriteEntry<int>>
What this holds, in the order its entries are numbered.
latefinaloverride-getter
hashCode → int
The hash code for this object.
no setterinherited
parts → List<Sprite<int>>
What this draws, in the order their entries are numbered.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reload() → SpriteGroup
Re-resolves this sprite against Ignis.cache.
override
resolve(int key) → SpriteEntry<int>?
The entry key names, or null where nothing here answers to it.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited