fix: 0-length animations
This commit is contained in:
parent
d63f835ebd
commit
4bf9b8d891
|
@ -10,6 +10,9 @@ export default class ControlMovement extends System {
|
||||||
|
|
||||||
tick(elapsed) {
|
tick(elapsed) {
|
||||||
for (const {Sprite} of this.select('default')) {
|
for (const {Sprite} of this.select('default')) {
|
||||||
|
if (0 === Sprite.speed) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Sprite.elapsed += elapsed / Sprite.speed;
|
Sprite.elapsed += elapsed / Sprite.speed;
|
||||||
while (Sprite.elapsed > 1) {
|
while (Sprite.elapsed > 1) {
|
||||||
Sprite.elapsed -= 1;
|
Sprite.elapsed -= 1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user