added item chests, audio and deployment
Signed-off-by: Pascal Syma <pascal@syma.dev>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user