叙事节拍
原能力
标注事件、道具或人物状态的变化点,保留对应的原剧本位置。(细化版 p.12–13)
首选项目
Ink(MIT)。 Ink
匹配范围
用 knots、stitches 和 tags 表达已标注的叙事状态变化。
源码
Ink · public void ChooseChoiceIndex(
ink-engine-runtime/Story.cs · 1794–1807 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
public void ChooseChoiceIndex(int choiceIdx)
{
var choices = currentChoices;
Assert (choiceIdx >= 0 && choiceIdx < choices.Count, "choice out of range");
// Replace callstack with the one from the thread at the choosing point,
// so that we can jump into the right place in the flow.
// This is important in case the flow was forked by a new thread, which
// can create multiple leading edges for the story, each of
// which has its own context.
var choiceToChoose = choices [choiceIdx];
if(onMakeChoice != null) onMakeChoice(choiceToChoose);
state.callStack.currentThread = choiceToChoose.threadAtGeneration;
实现与验收要点
识别节拍及其意义、核对道具和人物状态。