added Storage and ControlsSettings
Signed-off-by: Pascal Syma <pascal@syma.dev>
This commit is contained in:
+9
-11
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user