mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2026-03-18 05:12:23 +01:00
Camera implemented.
This commit is contained in:
@@ -61,9 +61,9 @@ export default class RetroSprite
|
||||
return new GeometryPoint(this.position.x + this.getWidth() * 0.5, this.position.y);
|
||||
}
|
||||
|
||||
draw(context)
|
||||
draw(context, camera)
|
||||
{
|
||||
context.drawImage(this.canvas, this.position.x, this.position.y);
|
||||
context.drawImage(this.canvas, this.position.x - camera.position.x, this.position.y - camera.position.y);
|
||||
}
|
||||
|
||||
hasRectCollisionWith(sprite)
|
||||
|
||||
Reference in New Issue
Block a user