Files
tianshu-engine/public/scenes/demo.json

224 lines
5.8 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"startScene": "intro",
"variables": {
"trust": 50,
"courage": 0,
"investigation": 0
},
"scenes": {
"intro": {
"id": "intro",
"videoUrl": "/videos/intro.mp4",
"subtitleUrl": "/subtitles/intro.vtt",
"choices": [
{
"text": "走向左边那扇发光的门",
"targetScene": "left_door",
"effects": [
{ "type": "add", "target": "courage", "value": 10 }
]
},
{
"text": "走向右边那扇普通的门",
"targetScene": "right_door",
"effects": [
{ "type": "add", "target": "courage", "value": -5 }
]
},
{
"text": "仔细搜索房间",
"targetScene": "investigation_site"
},
{
"text": "留在原地,什么也不做",
"targetScene": "stay"
}
]
},
"investigation_site": {
"id": "investigation_site",
"type": "image",
"videoUrl": "",
"imageUrl": "/images/investigation_scene.jpg",
"subtitleUrl": "/subtitles/investigation.vtt",
"hotspots": [
{
"id": "hs_desk",
"label": "查看书桌",
"targetScene": "desk_detail",
"x": 0.12, "y": 0.20, "width": 0.18, "height": 0.14,
"effects": [
{ "type": "add", "target": "investigation", "value": 1 },
{ "type": "toggleFlag", "target": "checked_desk" }
]
},
{
"id": "hs_window",
"label": "查看窗户",
"targetScene": "corridor",
"x": 0.47, "y": 0.06, "width": 0.15, "height": 0.28
},
{
"id": "hs_closet",
"label": "检查衣柜",
"targetScene": "desk_detail",
"x": 0.33, "y": 0.48, "width": 0.10, "height": 0.26,
"conditions": [
{ "variable": "investigation", "op": ">=", "value": 1 }
],
"effects": [
{ "type": "add", "target": "investigation", "value": 1 }
]
}
],
"choices": [
{ "text": "离开房间", "targetScene": "corridor" }
]
},
"corridor": {
"id": "corridor",
"videoUrl": "/videos/corridor.mp4",
"hotspots": [
{
"id": "hs_left",
"label": "走向左边通道",
"targetScene": "left_door",
"x": 0.02, "y": 0.30, "width": 0.30, "height": 0.45,
"showAt": 1.5,
"effects": [
{ "type": "add", "target": "courage", "value": 5 }
]
},
{
"id": "hs_center",
"label": "走向中间通道",
"targetScene": "trust_ending",
"x": 0.33, "y": 0.25, "width": 0.34, "height": 0.55,
"showAt": 3.0
},
{
"id": "hs_right",
"label": "走向右边通道",
"targetScene": "alone_ending",
"x": 0.68, "y": 0.30, "width": 0.30, "height": 0.45,
"showAt": 5.0
}
]
},
"left_door": {
"id": "left_door",
"videoUrl": "/videos/left_door.mp4",
"subtitleUrl": "/subtitles/left_door.vtt",
"choices": [
{
"text": "与陌生人握手",
"targetScene": "trust_ending",
"effects": [
{ "type": "add", "target": "trust", "value": 30 }
]
},
{
"text": "拒绝握手,保持警惕",
"targetScene": "alone_ending"
}
]
},
"right_door": {
"id": "right_door",
"videoUrl": "/videos/right_door.mp4",
"qte": {
"triggerTime": 1.0,
"prompt": "躲避飞来的石块!",
"keys": ["ArrowLeft", "ArrowRight", "a", "d"],
"timeLimit": 3.0,
"successScene": "qte_success",
"failScene": "qte_fail",
"effects": {
"success": [{ "type": "add", "target": "courage", "value": 15 }],
"fail": [{ "type": "add", "target": "trust", "value": -20 }]
}
}
},
"qte_success": {
"id": "qte_success",
"videoUrl": "/videos/qte_success.mp4",
"choices": [
{
"text": "继续前进",
"targetScene": "continue_ending"
},
{
"text": "回头",
"targetScene": "intro"
}
]
},
"qte_fail": {
"id": "qte_fail",
"videoUrl": "/videos/qte_fail.mp4",
"choices": [
{
"text": "继续前进",
"targetScene": "continue_ending"
},
{
"text": "回头",
"targetScene": "intro"
}
]
},
"desk_detail": {
"id": "desk_detail",
"videoUrl": "/videos/continue_ending.mp4",
"choices": [
{
"text": "返回调查现场",
"targetScene": "investigation_site"
},
{
"text": "离开",
"targetScene": "corridor"
}
]
},
"stay": {
"id": "stay",
"videoUrl": "/videos/stay.mp4",
"subtitleUrl": "/subtitles/stay.vtt",
"nextScene": "alone_ending"
},
"trust_ending": {
"id": "trust_ending",
"videoUrl": "/videos/trust_ending.mp4",
"choices": [
{
"text": "开启信任的旅程(需要 trust >= 80",
"targetScene": "secret_ending",
"conditions": [
{ "variable": "trust", "op": ">=", "value": 80 }
]
},
{
"text": "离开这里",
"targetScene": "alone_ending"
}
]
},
"secret_ending": {
"id": "secret_ending",
"videoUrl": "/videos/continue_ending.mp4",
"choices": []
},
"alone_ending": {
"id": "alone_ending",
"videoUrl": "/videos/alone_ending.mp4",
"choices": []
},
"continue_ending": {
"id": "continue_ending",
"videoUrl": "/videos/continue_ending.mp4",
"choices": []
}
}
}