diff --git a/dist/shattered_sword_assets/jsons/level1story.json b/dist/shattered_sword_assets/jsons/level1story.json index d308012..ff3147d 100644 --- a/dist/shattered_sword_assets/jsons/level1story.json +++ b/dist/shattered_sword_assets/jsons/level1story.json @@ -21,12 +21,114 @@ }, { "speaker": "", - "content": "Press A/LEFT to go LEFT and D/RIGHT to go right", + "content": "There was the legendary royal greatsword that would grant great power to its wielder", "actions": [ { "type": "hideSprite", "key": "storymode" }, + { + "type": "loadSprite", + "key": "sword", + "path": "shattered_sword_assets/images/story1.png", + "positon": [ + 300, + 150 + ], + "scale": [ + 4, + 4 + ] + } + ] + }, + { + "speaker": "", + "content": "But an evil monster shattered it into 6 pieces", + "actions": [ + { + "type": "hideSprite", + "key": "sword" + }, + { + "type": "loadSprite", + "key": "sword_shattered", + "path": "shattered_sword_assets/images/story2.png", + "positon": [ + 300, + 150 + ], + "scale": [ + 4, + 4 + ] + } + ] + }, + { + "speaker": "", + "content": "Hiro is the only surviving prince from the kingdom destroyed by the monster", + "actions": [ + { + "type": "hideSprite", + "key": "sword_shattered" + }, + { + "type": "loadSprite", + "key": "hiro_appear", + "path": "shattered_sword_assets/images/story3.png", + "positon": [ + 300, + 150 + ], + "scale": [ + 4, + 4 + ] + } + ] + }, + { + "speaker": "Hiro", + "content": "To bring prosperity back to the kingdom...", + "actions": [ + { + "type": "hideSprite", + "key": "hiro_appear" + }, + { + "type": "loadSprite", + "key": "hiro_sword", + "path": "shattered_sword_assets/images/story4.png", + "positon": [ + 300, + 150 + ], + "scale": [ + 4, + 4 + ] + } + ] + }, + { + "speaker": "Hiro", + "content": "I must go on the journey to collect the pieces of the sword... and kill the monster!", + "actions": [ + { + "type": "showSprite", + "key": "hiro_sword" + } + ] + }, + { + "speaker": "", + "content": "Press A/LEFT to go LEFT and D/RIGHT to go right", + "actions": [ + { + "type": "hideSprite", + "key": "hiro_sword" + }, { "type": "loadSprite", "key": "rightleft", @@ -191,17 +293,8 @@ "content": "Snakes can fall from the sky at any moment, and apply poison when they hit you.", "actions": [ { - "type": "loadSprite", - "key": "enemies", - "path": "shattered_sword_assets/images/forest_story1.png", - "positon": [ - 300, - 150 - ], - "scale": [ - 3, - 3 - ] + "type": "showSprite", + "key": "enemies" } ] }, diff --git a/dist/shattered_sword_assets/spritesheets/FinalBoss.json b/dist/shattered_sword_assets/spritesheets/FinalBoss.json index 3902646..e9c9bbf 100644 --- a/dist/shattered_sword_assets/spritesheets/FinalBoss.json +++ b/dist/shattered_sword_assets/spritesheets/FinalBoss.json @@ -3,9 +3,7 @@ "spriteSheetImage": "FinalBoss.png", "spriteWidth": 80, "spriteHeight": 80, - "width": 1260, - "height": 80, - "columns": 16, + "columns": 19, "rows": 1, "durationType": "time", "animations": [ @@ -126,6 +124,24 @@ "duration": 20 } ] + }, + { + "name": "WALK", + "repeat": true, + "frames": [ + { + "index": 16, + "duration": 15 + }, + { + "index": 17, + "duration": 15 + }, + { + "index": 18, + "duration": 15 + } + ] } ] } diff --git a/dist/shattered_sword_assets/spritesheets/FinalBoss.png b/dist/shattered_sword_assets/spritesheets/FinalBoss.png index 9c3d1fe..b5377fd 100644 Binary files a/dist/shattered_sword_assets/spritesheets/FinalBoss.png and b/dist/shattered_sword_assets/spritesheets/FinalBoss.png differ diff --git a/src/shattered_sword/GameSystems/InventoryManager.ts b/src/shattered_sword/GameSystems/InventoryManager.ts index 6e1fbd2..647ab7b 100644 --- a/src/shattered_sword/GameSystems/InventoryManager.ts +++ b/src/shattered_sword/GameSystems/InventoryManager.ts @@ -27,9 +27,15 @@ export default class InventoryManager { // Add layers this.slotLayer = slotLayer; - scene.addUILayer(this.slotLayer).setDepth(100); + let layer = scene.addUILayer(this.slotLayer); + layer.setDepth(100); + layer.setHidden(true); + this.itemLayer = itemLayer; - scene.addUILayer(this.itemLayer).setDepth(101); + layer = scene.addUILayer(this.itemLayer) + layer.setDepth(101); + layer.setHidden(true); + // Create the inventory slots for(let i = 0; i < size; i++){ @@ -47,6 +53,7 @@ export default class InventoryManager { this.selectedSlot = scene.add.graphic(GraphicType.RECT, slotLayer, {position: this.position.clone(), size: this.slotSize.clone().inc(-2)}); this.selectedSlot.color = Color.WHITE; this.selectedSlot.color.a = 0.2; + } getItem(): Item {