Merge remote-tracking branch 'github/master'

This commit is contained in:
Renge 2022-05-09 16:27:29 -04:00
commit fa8ba106d8
4 changed files with 133 additions and 17 deletions

View File

@ -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"
}
]
},

View File

@ -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
}
]
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -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 = <Rect>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 {