replaceAnimation method
Implementation
Future<void> replaceAnimation(
SimpleDirectionAnimation newAnimation, {
bool doIdle = false,
}) async {
await newAnimation.onLoad(gameRef);
animation = newAnimation;
if (doIdle) {
idle();
}
}
Future<void> replaceAnimation(
SimpleDirectionAnimation newAnimation, {
bool doIdle = false,
}) async {
await newAnimation.onLoad(gameRef);
animation = newAnimation;
if (doIdle) {
idle();
}
}