SimpleDirectionAnimation class

Class responsible to manager animation on SimplePlayer and SimpleEnemy

Constructors

SimpleDirectionAnimation({required FutureOr<SpriteAnimation> idleRight, required FutureOr<SpriteAnimation> runRight, FutureOr<SpriteAnimation>? idleLeft, FutureOr<SpriteAnimation>? runLeft, FutureOr<SpriteAnimation>? idleUp, FutureOr<SpriteAnimation>? idleDown, FutureOr<SpriteAnimation>? idleUpLeft, FutureOr<SpriteAnimation>? idleUpRight, FutureOr<SpriteAnimation>? idleDownLeft, FutureOr<SpriteAnimation>? idleDownRight, FutureOr<SpriteAnimation>? runUp, FutureOr<SpriteAnimation>? runDown, FutureOr<SpriteAnimation>? runUpLeft, FutureOr<SpriteAnimation>? runUpRight, FutureOr<SpriteAnimation>? runDownLeft, FutureOr<SpriteAnimation>? runDownRight, Map<String, FutureOr<SpriteAnimation>>? others, bool enabledFlipX = true, bool enabledFlipY = false, bool eightDirection = false})

Properties

beforeLastPlayedAnimation SimpleAnimationEnum?
getter/setter pair
currentType SimpleAnimationEnum?
no setter
eightDirection bool
getter/setter pair
enabledFlipX bool
getter/setter pair
enabledFlipY bool
getter/setter pair
gameRef BonfireGameInterface?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
idleDown SpriteAnimation?
getter/setter pair
idleDownLeft SpriteAnimation?
getter/setter pair
idleDownRight SpriteAnimation?
getter/setter pair
idleLeft SpriteAnimation?
getter/setter pair
idleRight SpriteAnimation?
getter/setter pair
idleUp SpriteAnimation?
getter/setter pair
idleUpLeft SpriteAnimation?
getter/setter pair
idleUpRight SpriteAnimation?
getter/setter pair
isFlipHorizontally bool
getter/setter pair
isFlipVertically bool
getter/setter pair
lastPlayedAnimation SimpleAnimationEnum?
getter/setter pair
needDoFlip bool
no setter
others Map<String, SpriteAnimation>
getter/setter pair
position Vector2
getter/setter pair
runDown SpriteAnimation?
getter/setter pair
runDownLeft SpriteAnimation?
getter/setter pair
runDownRight SpriteAnimation?
getter/setter pair
runLeft SpriteAnimation?
getter/setter pair
runRight SpriteAnimation?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
runToTheEndFastAnimation bool
getter/setter pair
runUp SpriteAnimation?
getter/setter pair
runUpLeft SpriteAnimation?
getter/setter pair
runUpRight SpriteAnimation?
getter/setter pair
size Vector2
getter/setter pair

Methods

addOtherAnimation(String key, FutureOr<SpriteAnimation> animation) Future<void>
Method used to register new animation in others
changeLastAnimation(SimpleAnimationEnum lastAnimation) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onLoad(BonfireGameInterface gameRef) Future<void>
pause() → void
play(SimpleAnimationEnum animation) → void
Method used to play specific default animation
playOnce(FutureOr<SpriteAnimation> animation, {VoidCallback? onFinish, VoidCallback? onStart, bool runToTheEnd = false, bool flipX = false, bool flipY = false, bool useCompFlip = false, Vector2? size, Vector2? offset}) Future
Method used to play animation once time
playOnceOther(String key, {VoidCallback? onFinish, VoidCallback? onStart, bool runToTheEnd = false, bool flipX = false, bool flipY = false, bool useCompFlip = false, Vector2? size, Vector2? offset}) Future
Method used to play animation once time specific animation registred in others
playOther(String key, {bool? flipX, bool? flipY}) → void
Method used to play specific animation registred in others
render(Canvas canvas, Paint paint) → void
resume() → void
toString() String
A string representation of this object.
inherited
update(double dt, Vector2 position, Vector2 size) → void

Operators

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