diff --git a/src/assets/assets.ts b/src/assets/assets.ts index 8cb45d1..775b436 100644 --- a/src/assets/assets.ts +++ b/src/assets/assets.ts @@ -44,7 +44,7 @@ const images: Image[] = [ /* Spritesheets */ const spritesheets: SpriteSheet[] = [ - spritesheet('effects/dustyexplosion', 'dust', 128, 128), + spritesheet('effects/dustyexplosion', 'dust', 256, 256), ]; /* Audios */ diff --git a/src/assets/images/effects/dustyexplosion.png b/src/assets/images/effects/dustyexplosion.png index e4e625d..5d6a216 100644 Binary files a/src/assets/images/effects/dustyexplosion.png and b/src/assets/images/effects/dustyexplosion.png differ diff --git a/src/components/Turtle.ts b/src/components/Turtle.ts index 36ff5f1..2650e01 100644 --- a/src/components/Turtle.ts +++ b/src/components/Turtle.ts @@ -35,6 +35,10 @@ export class Turtle extends Button { private walkTarget: Phaser.Geom.Point; private walkTimer: number; + //Scor + private baseScore: number; + private multiplier: number; + // Jumping private trampoline: Trampoline; private feetOffset: number; @@ -94,6 +98,8 @@ export class Turtle extends Button { this.newJumpTarget(); this.maxJumpSpeed = Phaser.Math.RND.between(27, 31); this.bounceCount = 0; + this.baseScore = 50+(Math.random()*100); + this.multiplier = 1.0; /* Input */ this.dragOffset = new Phaser.Math.Vector2(); @@ -121,6 +127,8 @@ export class Turtle extends Button { if (jumpSpeed > maxSpeed - 10) { this.bounceCount += 1; + this.multiplier += 0.05; + this.scene.sound.play("t_rustle",{ volume: 0.5 }); this.emit("bounce"); } } @@ -166,7 +174,7 @@ export class Turtle extends Button { this.physicsPosition.y = this.border.bottom - this.feetOffset; if (this.lostBalance && !this.hasCrashed) { this.hasCrashed = true; - this.scene.addDust(this.x+this.sprite.x, this.y+this.sprite.y); + this.scene.addDust(this.x+this.sprite.x, this.y+this.sprite.y-75); this.emit("crashed"); } }