ludic/docs/site/snippets/scenes.ludic
Orkuncakilkaya 583783449a docs: correct stale references across LANGUAGE, README, COMPILING, CONTRIBUTING
- LANGUAGE.md: real diagnostic format, list literals, Font.load / Ui.*
  (no `reg`/`set_reg`, no `/Handler/Library` typo), `extern function`,
  existing example links, Input.key(); builtins table trimmed to what exists
- COMPILING.md: pipeline names selfhost/ (not compiler/*.c), `program`
  instead of game/module, all thirteen win_* entry points by group
- README.md: the window seam is not "five" functions
- CONTRIBUTING.md: docs are checked with `x docs-gen` / `x docs-check`
- docs/language: kw-ui and fn-ui_build use the namespaced API;
  @ClearColor documents constant expressions; examples/README lists
  operators.ludic

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-05 01:12:26 +03:00

38 lines
693 B
Text

program SceneDemo {
var counter: int = 0
handler Boot phase Start {
counter = 0
print(1000)
}
scene Title start {
on enter { print(1) }
on exit { print(2) }
layer Main {
handler Tick phase Update {
counter += 1
print(100 + counter)
if counter >= 2 { become Play } # hand off to Play
}
}
}
scene Play {
on enter {
print(3)
counter = 0
}
on exit { print(4) }
layer World {
handler Step phase Update {
counter += 1
print(200 + counter)
if counter >= 2 { quit() }
}
}
layer Hud {
handler DrawHud phase Render { print(900) }
}
}
}