// "Hello, world!" with "world" in red colorconst sentence: SentencePrompt = [ "Hello, ", new Word("world", {color: "#f00"}), // a red word "!"];
Pausing sentence
// "Hello, ", pause for 1 second, "world" and wait until player click, "!"const sentence: SentencePrompt = [ "Hello, ", Pause.wait(1000), // pause for 1 second "world", Pause, // wait until player click "!"];
Dynamic sentence
// "Hello, you have 100 coins!"const sentence: SentencePrompt = [ "Hello, ", ({storable}) => { return `you have ${storable.getNamespace("game").get("coin")} coins` }, "!"];
Dynamic evaluated sentence
// "Hello, you have 100 coins!" with "100" in red colorconst sentence: SentencePrompt = [ "Hello, ", ({storable}) => { return [ "you have ", new Word(`${storable.getNamespace("game").get("coin")}`, {color: "#f00"}), " coins" ] }, "!"];