added item chests, audio and deployment

Signed-off-by: Pascal Syma <pascal@syma.dev>
This commit is contained in:
2020-07-16 20:51:24 +02:00
parent 0004849110
commit 7559a3f40a
27 changed files with 237 additions and 36 deletions
+5
View File
@@ -22,7 +22,11 @@ export default class TextElement {
if (item.name === "action") {
this.text.setInteractive(new Phaser.Geom.Rectangle(0, 0, this.text.width, this.text.height), Phaser.Geom.Rectangle.Contains)
.on('pointerover', () => {
this.scene.sound.play('menu_hover', {volume: 0.3});
})
.on('pointerdown', () => {
this.scene.sound.play('menu_click', {volume: 0.5});
let action = item.properties.filter(obj => obj.name === "action");
if (action.length <= 0)
return;
@@ -33,6 +37,7 @@ export default class TextElement {
case "pause_resume":
this.endMyself();
scene.scene.resume('Game');
this.scene.scene.get('Game').music.play();
break;
case "pause_exit":
this.endMyself();