@@ -14,6 +14,7 @@ export default class Player extends Entity {
|
||||
constructor(scene, spawnPoint, texture) {
|
||||
super(scene, spawnPoint.x, spawnPoint.y, texture);
|
||||
this.setData("speed", 100);
|
||||
this.setData('jump', 1.5)
|
||||
this.setData('hp', 10);
|
||||
this.setOrigin(0.5, 1).setScale(32 / 48);
|
||||
|
||||
@@ -74,7 +75,7 @@ export default class Player extends Entity {
|
||||
|
||||
// Jumping, Dashing
|
||||
if (this.scene.upActive() && this.body.blocked.down) {
|
||||
this.body.velocity.y = -this.getData('speed') * 1.5;
|
||||
this.body.velocity.y = -this.getData('speed') * this.getData('jump');
|
||||
}
|
||||
|
||||
// Walking L R
|
||||
|
||||
Reference in New Issue
Block a user