refactor scaffolding to Scenes and Characters for intuitive writing with
yarn
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// Shared declarations for the whole project.
|
||||
//
|
||||
// This node is never played. Declaring every variable in one place means the
|
||||
// compiler catches typos ("$reputaton") instead of silently creating a second
|
||||
// variable at runtime.
|
||||
|
||||
title: Declarations
|
||||
---
|
||||
// How much the door staff likes you.
|
||||
<<declare $reputation = 0 as number>>
|
||||
|
||||
// Set when the player has tried the "I'm on the list" line at least once.
|
||||
<<declare $claimed_to_be_on_list = false as bool>>
|
||||
|
||||
// The bouncer's verdict, read by the scene that called him.
|
||||
<<declare $went_inside = false as bool>>
|
||||
|
||||
// Smart variable: derived, not stored. Can never drift out of sync with
|
||||
// $reputation, so there's nothing to remember to update.
|
||||
<<declare $is_vip = $reputation > 10>>
|
||||
===
|
||||
Reference in New Issue
Block a user