docs(0.S): the doc fences migrated by ludic migrate state; LANGUAGE.md's state section says what the tool and the checker do now; no module-level var left in the docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
19fcf60599
commit
a476ec7976
79 changed files with 481 additions and 355 deletions
|
|
@ -18,15 +18,17 @@ Parameters:
|
|||
|
||||
```ludic
|
||||
program ClearBackground {
|
||||
var elapsed_frames: int = 0
|
||||
|
||||
handler CountFrames phase Update {
|
||||
elapsed_frames = elapsed_frames + 1
|
||||
state ClearBackgroundState {
|
||||
elapsed_frames: int = 0
|
||||
}
|
||||
|
||||
handler DrawWorld phase Render {
|
||||
handler CountFrames(clear_background_st: mut ClearBackgroundState) phase Update {
|
||||
clear_background_st.elapsed_frames = clear_background_st.elapsed_frames + 1
|
||||
}
|
||||
|
||||
handler DrawWorld(clear_background_st: ClearBackgroundState) phase Render {
|
||||
Screen.clear(Color.MidnightBlue)
|
||||
Screen.draw_number(x: 8, y: 8, value: elapsed_frames, color: Color.White, scale: 1)
|
||||
Screen.draw_number(x: 8, y: 8, value: clear_background_st.elapsed_frames, color: Color.White, scale: 1)
|
||||
Screen.show()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue