add story draft

This commit is contained in:
Kelly Peng 2022-04-11 22:36:56 -04:00
parent 8e56aa9450
commit cc34842dee
7 changed files with 144 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 715 B

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 821 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -49,16 +49,76 @@
] ]
}, },
{ {
"speaker": "Hiro", "speaker": "",
"content": "Hello\r\n\nworld!", "content": "Hiro is the only prince from the kingdom",
"actions": [ "actions": [
{
"type": "hideSprite",
"key": "sword_shattered"
},
{
"type": "loadSprite",
"key": "hiro_appear",
"path": "shattered_sword_assets/images/story3.png",
"positon": [
630,
300
],
"scale": [
7,
7
]
}
]
},
{
"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": [
630,
300
],
"scale": [
7,
7
]
}
]
},
{
"speaker": "Hiro",
"content": "I should go on the journey to collect the pieces of the sword... and kill the monster!",
"actions": [
{
"type": "showSprite",
"key": "hiro_sword"
}
]
},
{
"speaker": "",
"content": "",
"actions": [
{
"type": "hideSprite",
"key": "hiro_sword"
},
{ {
"type": "loadSprite", "type": "loadSprite",
"key": "hiro", "key": "hiro",
"path": "shattered_sword_assets/images/Logo.png", "path": "shattered_sword_assets/images/Logo.png",
"positon": [ "positon": [
500, 650,
500 300
], ],
"scale": [ "scale": [
1, 1,

View File

@ -47,6 +47,85 @@
] ]
} }
] ]
},
{
"speaker": "",
"content": "Hiro is the only prince from the kingdom",
"actions": [
{
"type": "hideSprite",
"key": "sword_shattered"
},
{
"type": "loadSprite",
"key": "hiro_appear",
"path": "shattered_sword_assets/images/story3.png",
"positon": [
630,
300
],
"scale": [
7,
7
]
}
]
},
{
"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": [
630,
300
],
"scale": [
7,
7
]
}
]
},
{
"speaker": "Hiro",
"content": "I should go on the journey to collect the pieces of the sword... and kill the monster!",
"actions": [
{
"type": "showSprite",
"key": "hiro_sword"
}
]
},
{
"speaker": "",
"content": "",
"actions": [
{
"type": "hideSprite",
"key": "hiro_sword"
},
{
"type": "loadSprite",
"key": "hiro",
"path": "shattered_sword_assets/images/Logo.png",
"positon": [
650,
300
],
"scale": [
1,
1
]
}
]
} }
] ]
} }

View File

@ -203,7 +203,7 @@ export default class SceneWithStory extends Scene {
let event = this.receiver.getNextEvent(); let event = this.receiver.getNextEvent();
// Testing code // Testing code
if (event.type === "loadStory" && this.currentMode === Mode.GAME_MODE) { if (event.type === "loadStory" && this.currentMode === Mode.GAME_MODE) {
this.storyLoader("shattered_sword_assets/jsons/samplestory.json"); this.storyLoader("shattered_sword_assets/jsons/story.json");
} }
} }
// Testing code // Testing code