SimpleDirectionAnimation class

Class responsible to manager animation on SimplePlayer and SimpleEnemy

Constructors

SimpleDirectionAnimation({required FutureOr<SpriteAnimation> idleLeft, required FutureOr<SpriteAnimation> idleRight, required FutureOr<SpriteAnimation> runRight, required 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, SimpleAnimationEnum initAnimation = SimpleAnimationEnum.idleRight})

Properties

currentType SimpleAnimationEnum?
no setter
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
opacity double
getter/setter pair
others Map<String, SpriteAnimation>
getter/setter pair
position Vector2Rect?
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

Methods

addOtherAnimation(String key, Future<SpriteAnimation> animation) Future<void>
Method used to register new animation in others
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onLoad() Future<void>
play(SimpleAnimationEnum animation) → void
Method used to play specific default animation
playOnce(Future<SpriteAnimation> animation, {VoidCallback? onFinish, bool runToTheEnd = false}) Future
Method used to play animation once time
playOther(String key) → void
Method used to play specific animation registred in others
render(Canvas canvas) → void
toString() String
A string representation of this object.
inherited
update(double dt, Vector2Rect position) → void

Operators

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