Merge remote-tracking branch 'origin/PascalMachtSachen' into PascalMachtSachen

This commit is contained in:
2020-07-13 16:39:21 +02:00
9 changed files with 2344 additions and 51 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.
*/
@@ -45,14 +45,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;
@@ -62,8 +62,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