Architecture implemented.

This commit is contained in:
Mal
2020-01-23 23:09:03 +01:00
parent fb762d1778
commit 388799c97e
5 changed files with 158 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ export default class Movable
};
this.position = new GeometryPoint();
this.speed = speed;
this.fallSpeed = 0;
}
playAnimation(animation, timestamp)
@@ -33,6 +34,11 @@ export default class Movable
this.position.x += this.speed * delta;
}
getRect()
{
return this.animations[this.currentAnimation].getRect();
}
draw(context)
{
this.animations[this.currentAnimation].setFootPosition(this.position.x, this.position.y);