feat: QTE prompt i18n via promptKey, fallback to prompt text
This commit is contained in:
@@ -63,6 +63,7 @@ export interface Effect {
|
|||||||
export interface QTEDefinition {
|
export interface QTEDefinition {
|
||||||
triggerTime: number
|
triggerTime: number
|
||||||
prompt: string
|
prompt: string
|
||||||
|
promptKey?: string
|
||||||
keys: string[]
|
keys: string[]
|
||||||
timeLimit: number
|
timeLimit: number
|
||||||
successScene: string
|
successScene: string
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
"choice": {
|
"choice": {
|
||||||
"continue": "Keep moving forward",
|
"continue": "Keep moving forward",
|
||||||
"back": "Turn back"
|
"back": "Turn back"
|
||||||
|
},
|
||||||
|
"qte": {
|
||||||
|
"dodge": "Dodge the flying rocks!"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"trust_ending": {
|
"trust_ending": {
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
"choice": {
|
"choice": {
|
||||||
"continue": "先へ進む",
|
"continue": "先へ進む",
|
||||||
"back": "引き返す"
|
"back": "引き返す"
|
||||||
|
},
|
||||||
|
"qte": {
|
||||||
|
"dodge": "飛んでくる石を避けろ!"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"trust_ending": {
|
"trust_ending": {
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
"choice": {
|
"choice": {
|
||||||
"continue": "继续前进",
|
"continue": "继续前进",
|
||||||
"back": "回头"
|
"back": "回头"
|
||||||
|
},
|
||||||
|
"qte": {
|
||||||
|
"dodge": "躲避飞来的石块!"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"trust_ending": {
|
"trust_ending": {
|
||||||
|
|||||||
@@ -224,6 +224,7 @@
|
|||||||
"qte": {
|
"qte": {
|
||||||
"triggerTime": 1.0,
|
"triggerTime": 1.0,
|
||||||
"prompt": "躲避飞来的石块!",
|
"prompt": "躲避飞来的石块!",
|
||||||
|
"promptKey": "right_door.qte.dodge",
|
||||||
"keys": ["ArrowLeft", "ArrowRight", "a", "d"],
|
"keys": ["ArrowLeft", "ArrowRight", "a", "d"],
|
||||||
"timeLimit": 3.0,
|
"timeLimit": 3.0,
|
||||||
"successScene": "qte_success",
|
"successScene": "qte_success",
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ init()
|
|||||||
/>
|
/>
|
||||||
<QTEOverlay
|
<QTEOverlay
|
||||||
:visible="store.qteActive"
|
:visible="store.qteActive"
|
||||||
:prompt="store.qteDef?.prompt ?? ''"
|
:prompt="store.qteDef ? t(store.qteDef.promptKey || store.qteDef.prompt) : ''"
|
||||||
:keys="store.qteDef?.keys ?? []"
|
:keys="store.qteDef?.keys ?? []"
|
||||||
:total="store.qteTotal"
|
:total="store.qteTotal"
|
||||||
:remaining="store.qteRemaining"
|
:remaining="store.qteRemaining"
|
||||||
|
|||||||
Reference in New Issue
Block a user