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