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<dynamic, FutureOr<SpriteAnimation>>? others, bool enabledFlipX = true, bool enabledFlipY = false, bool eightDirection = false, Vector2? centerAnchor})

Properties

beforeLastPlayedAnimation SimpleAnimationEnum?
getter/setter pair
canIdleDown bool
no setter
canIdleUp bool
no setter
canRunDown bool
no setter
canRunDownLeft bool
no setter
canRunDownRight bool
no setter
canRunUp bool
no setter
canRunUpLeft bool
no setter
canRunUpRight bool
no setter
centerAnchor Vector2?
getter/setter pair
currentIndex int
no setter
currentType SimpleAnimationEnum?
no setter
eightDirection bool
getter/setter pair
enabledFlipX bool
getter/setter pair
enabledFlipY bool
getter/setter pair
fastAnimationcurrentIndex int
no setter
gameRef BonfireGameInterface?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isFlipHorizontally bool
getter/setter pair
isFlipHorizontallyFastAnimation bool
getter/setter pair
isFlipVertically bool
getter/setter pair
isFlipVerticallyFastAnimation bool
getter/setter pair
lastPlayedAnimation SimpleAnimationEnum?
getter/setter pair
others Map<dynamic, SpriteAnimation>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
runToTheEndFastAnimation bool
getter/setter pair
size Vector2
getter/setter pair
spriteAnimationOffset Vector2?
getter/setter pair

Methods

addOtherAnimation(dynamic key, FutureOr<SpriteAnimation> animation) Future<void>
Method used to register new animation in others
containOther(dynamic key) bool
hideStroke() → 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<void>
Method used to play animation once time
playOnceOther(dynamic key, {VoidCallback? onFinish, VoidCallback? onStart, bool runToTheEnd = false, bool flipX = false, bool flipY = false, bool useCompFlip = false, Vector2? size, Vector2? offset}) Future<void>
Method used to play animation once time
playOther(dynamic key, {bool? flipX, bool? flipY}) → void
Method used to play specific animation registred in others
render(Canvas canvas, Paint paint) → void
resume() → void
showStroke(Color color, double width, {Vector2? offset}) → void
toString() String
A string representation of this object.
inherited
update(double dt, Vector2 size) → void

Operators

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