Skip to content
Snippets Groups Projects
Commit 92965712 authored by Paolo.Brasolin's avatar Paolo.Brasolin
Browse files

feat: #fe responsive spear length

parent 2a51c6e4
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,8 @@ class Spear extends Phaser.Physics.Arcade.Sprite { ...@@ -20,7 +20,8 @@ class Spear extends Phaser.Physics.Arcade.Sprite {
this.play({ key: "spearAni", repeat: -1 }); this.play({ key: "spearAni", repeat: -1 });
scene.add.existing(this); scene.add.existing(this);
this.setScale(3); // NOTE: a spear reaching shoulder height makes sense
this.setScale((scene.player.displayHeight * 0.8) / this.displayWidth);
this.source = source; this.source = source;
this.target = target; this.target = target;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment