added Storage and ControlsSettings

Signed-off-by: Pascal Syma <pascal@syma.dev>
This commit is contained in:
2020-06-04 17:42:23 +02:00
parent 7c4d08cf8f
commit 07e08ba4f6
7 changed files with 262 additions and 45 deletions
+9 -11
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020. Pascal Syma <pascal@syma.dev>
* Copyright (c) 2020. Antonio Martinez Casadesus and Pascal Syma.
* All rights reserved.
*/
@@ -42,14 +42,14 @@ export default class Player extends Entity {
}
update(...args) {
if (this.scene.dieActive()) {
this.pause = true;
this.play('die', true)
.once('animationcomplete', () => {
this.setFrame(51);
this.scene.scene.pause();
})
}
// if (this.scene.dieActive()) {
// this.pause = true;
// this.play('die', true)
// .once('animationcomplete', () => {
// this.setFrame(51);
// this.scene.scene.pause();
// })
// }
if (this.pause)
return;
@@ -59,8 +59,6 @@ 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;
} else if (this.scene.downActive() && !this.body.blocked.down) {
this.body.velocity.y = this.getData('speed');
}
// Walking L R