Should work with 64x64 collectable
This commit is contained in:
parent
03c9a31d17
commit
9d3898ecf0
|
@ -236,7 +236,7 @@ class Scene extends Screen {
|
||||||
|
|
||||||
this.context.drawImage(
|
this.context.drawImage(
|
||||||
Collectable.texture,
|
Collectable.texture,
|
||||||
0, 32 * object.frameNumber, 32, 32,
|
0, 64 * object.frameNumber, 64, 64,
|
||||||
(object.x - object.size / 2) * this.width(),
|
(object.x - object.size / 2) * this.width(),
|
||||||
(1 - object.y) * this.height() - size / 2,
|
(1 - object.y) * this.height() - size / 2,
|
||||||
size, size
|
size, size
|
||||||
|
@ -306,7 +306,7 @@ class Scene extends Screen {
|
||||||
|
|
||||||
// Draw coin number
|
// Draw coin number
|
||||||
this.context.drawImage(Collectable.texture,
|
this.context.drawImage(Collectable.texture,
|
||||||
0, 0, 32, 32,
|
0, 0, 64, 64,
|
||||||
0, fontSize + 5, 0.05 * this.width(), 0.05 * this.width());
|
0, fontSize + 5, 0.05 * this.width(), 0.05 * this.width());
|
||||||
|
|
||||||
this.context.fillText(this.collectableNumber, 0.05 * this.width() + 5, 2 * fontSize)
|
this.context.fillText(this.collectableNumber, 0.05 * this.width() + 5, 2 * fontSize)
|
||||||
|
|
Loading…
Reference in New Issue