mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
Performance optimizations and refacturing.
This commit is contained in:
@@ -109,7 +109,9 @@ export default class Movable
|
||||
|
||||
draw(context, camera)
|
||||
{
|
||||
this.animations[this.currentAnimation].setFootPosition(this.position.x, this.position.y);
|
||||
this.animations[this.currentAnimation].draw(context, camera);
|
||||
if (camera.isMovableInsideView(this)) {
|
||||
this.animations[this.currentAnimation].setFootPosition(this.position.x, this.position.y);
|
||||
this.animations[this.currentAnimation].draw(context, camera);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user