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": "", "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": [ "actions": [
{ {
"type": "hideSprite", "type": "hideSprite",
"key": "storymode" "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", "type": "loadSprite",
"key": "rightleft", "key": "rightleft",
@ -191,17 +293,8 @@
"content": "Snakes can fall from the sky at any moment, and apply poison when they hit you.", "content": "Snakes can fall from the sky at any moment, and apply poison when they hit you.",
"actions": [ "actions": [
{ {
"type": "loadSprite", "type": "showSprite",
"key": "enemies", "key": "enemies"
"path": "shattered_sword_assets/images/forest_story1.png",
"positon": [
300,
150
],
"scale": [
3,
3
]
} }
] ]
}, },

View File

@ -3,9 +3,7 @@
"spriteSheetImage": "FinalBoss.png", "spriteSheetImage": "FinalBoss.png",
"spriteWidth": 80, "spriteWidth": 80,
"spriteHeight": 80, "spriteHeight": 80,
"width": 1260, "columns": 19,
"height": 80,
"columns": 16,
"rows": 1, "rows": 1,
"durationType": "time", "durationType": "time",
"animations": [ "animations": [
@ -126,6 +124,24 @@
"duration": 20 "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 // Add layers
this.slotLayer = slotLayer; this.slotLayer = slotLayer;
scene.addUILayer(this.slotLayer).setDepth(100); let layer = scene.addUILayer(this.slotLayer);
layer.setDepth(100);
layer.setHidden(true);
this.itemLayer = itemLayer; this.itemLayer = itemLayer;
scene.addUILayer(this.itemLayer).setDepth(101); layer = scene.addUILayer(this.itemLayer)
layer.setDepth(101);
layer.setHidden(true);
// Create the inventory slots // Create the inventory slots
for(let i = 0; i < size; i++){ 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 = <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 = Color.WHITE;
this.selectedSlot.color.a = 0.2; this.selectedSlot.color.a = 0.2;
} }
getItem(): Item { getItem(): Item {