MenuChoice
type MenuChoice = {
action: (ChainedAction | ChainedAction[] | Actions | Actions[])[];
prompt: (string | Word)[] | (string | Word) | Sentence;
};
Example:
new Menu("What should I do?")
/**
* option: "Go left"
* action: say "I went left" and jump to scene2
*/
.choose({
prompt: "Go left",
action: [
character1.say("I went left"),
scene1.jumpTo(scene2)
]
})
/**
* option: "Go right" with red color
* action: say "I went right"
*/
.choose({
prompt: new Sentence([
"Go",
new Word("right", {color: "#ff0000"})
]),
action: [
character1.say("I went right")
]
})