mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2026-03-18 05:12:23 +01: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