SsUiStateDriver class

Plays the section a SsUiState calls for on a player the host owns.

show switches at once and plays the new section from its first frame, looping; the section that was playing is dropped. Under reduced motion it holds the section's first frame instead, so no event fires, except that SsUiState.normal plays the reduced_motion label's section when the animation has one.

It takes the player's playback over: it selects animations, sets sections and the loop count, and plays and stops.

Constructors

SsUiStateDriver(SpriteStudioPlayer player, {String? animation, Map<SsUiState, SsUiClip> clips = const {}})

Properties

animation → String?
The animation the states' labels are read from. When null, the one the player has selected the first time a state is shown, or else the pack's first.
final
clips → Map<SsUiState, SsUiClip>
Per-state replacements for the labels named after the states.
final
hashCode → int
The hash code for this object.
no setterinherited
player → SpriteStudioPlayer
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → SsUiState?
The state last shown, or null before one has been.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
show(SsUiState state, {bool reducedMotion = false}) → void
Shows state — or nothing before the player has loaded a pack.
toString() → String
A string representation of this object.
inherited

Operators

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