返回对活动(当前)故事变量存储的引用(等价于 State.variables)。这仅在纯 JavaScript 代码中有用,因为在 TwineScript 中可直接原生访问故事变量。(variables() 是「故事变量总库」——JS 里要摸 $变量,靠它开门。)
State.variables
variables()
$变量
无
故事变量存储的引用(Object)。
Object
// 给定:$hasGoldenKey 为 true if (variables().hasGoldenKey) { /* 做点什么… */ }
波正在努力加载喵...