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
+23 -1
View File
@@ -21,6 +21,17 @@ import batDie from "../assets/BatDie.png";
import item_01 from "../assets/items/itemshard_01.png";
import item_02 from "../assets/items/itemshard_02.png";
import item_03 from "../assets/items/itemshard_03.png";
import heal from "../assets/items/heal.png";
import slow from "../assets/items/slow.png";
import speed from "../assets/items/speed.png";
import storm from "../assets/items/storm.png";
import heart from "../assets/heart.png";
import chest from "../assets/chest.png";
import menu_click from "../assets/audio/menu_click.wav";
import menu_hover from "../assets/audio/menu_hover.wav";
import background_start from "../assets/audio/background_start.wav";
import background_loop from "../assets/audio/background_loop.wav";
export default class Preload extends Phaser.Scene {
@@ -34,6 +45,7 @@ export default class Preload extends Phaser.Scene {
this.load.image("item_01", item_01);
this.load.image("item_02", item_02);
this.load.image("item_03", item_03);
this.load.image("heart", heart);
this.load.spritesheet('charA', charA, {frameWidth: 79, frameHeight: 63, margin: 1, spacing: 2});
this.load.spritesheet('charB', charB, {frameWidth: 79, frameHeight: 63, margin: 1, spacing: 2});
this.load.spritesheet('charC', charC, {frameWidth: 79, frameHeight: 63, margin: 1, spacing: 2});
@@ -44,11 +56,21 @@ export default class Preload extends Phaser.Scene {
this.load.spritesheet('buttontiles', buttontiles, {frameWidth: 16, frameHeight: 16, margin: 1, spacing: 2});
this.load.spritesheet('batFly', batFly, {frameWidth: 48, frameHeight: 32/*, margin: 1, spacing: 2*/});
this.load.spritesheet('batDie', batDie, {frameWidth: 48, frameHeight: 32/*, margin: 1, spacing: 2*/});
this.load.spritesheet('chest', chest, {frameWidth: 32, frameHeight: 32, margin: 1, spacing: 2});
this.load.spritesheet('heal', heal, {frameWidth: 16, frameHeight: 16, margin: 1, spacing: 2});
this.load.spritesheet('storm', storm, {frameWidth: 16, frameHeight: 16, margin: 1, spacing: 2});
this.load.spritesheet('speed', speed, {frameWidth: 16, frameHeight: 16, margin: 1, spacing: 2});
this.load.spritesheet('slow', slow, {frameWidth: 16, frameHeight: 16, margin: 1, spacing: 2});
this.load.tilemapTiledJSON("map", map);
this.load.tilemapTiledJSON("menu", menu);
this.load.atlas({key: 'skeleton', textureURL: skeletonSprite, atlasURL: skeletonAtlas});
this.load.audio('menu_click', menu_click);
this.load.audio('menu_hover', menu_hover);
this.load.audio('background_start', background_start);
this.load.audio('background_loop', background_loop);
}
create() {
@@ -113,4 +135,4 @@ export default class Preload extends Phaser.Scene {
});
}
}
}