wip(0.S3): packages and examples migrated again from their pre-0.S sources in one run
ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic 1804 vars into 126 states, 64 into lets; 23498 edits in 460 files Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5ffe50ed02
commit
19fcf60599
459 changed files with 17862 additions and 17603 deletions
|
|
@ -12,9 +12,11 @@ program InputAuto {
|
|||
property Tag { n: int = 0 }
|
||||
model Player { Tag }
|
||||
|
||||
var hits: int = 0
|
||||
state InputAutoState {
|
||||
hits: int = 0
|
||||
}
|
||||
|
||||
@OnStart handler Boot { Input.action("go", 'l') } # 'l' == 108
|
||||
handler Sense phase Update { if Input.active("go") { hits += 1 } }
|
||||
@OnQuit handler Report { print(hits) }
|
||||
handler Sense(input_auto_st: mut InputAutoState) phase Update { if Input.active("go") { input_auto_st.hits += 1 } }
|
||||
@OnQuit handler Report(input_auto_st: InputAutoState) { print(input_auto_st.hits) }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue