mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
Architecture implemented.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user