wip(0.S2): migrate - a var nothing writes becomes a let; a state is keyed by its module, directory or program, so every program's plan agrees; paths normalized; program states named SceneDemoState / scene_demo_st; the LSP reads state, mut and entry/handler parameters
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3eda72e8c2
commit
5ffe50ed02
463 changed files with 72045 additions and 67421 deletions
|
|
@ -12,11 +12,9 @@ program InputAuto {
|
|||
property Tag { n: int = 0 }
|
||||
model Player { Tag }
|
||||
|
||||
state InputautoState {
|
||||
hits: int = 0
|
||||
}
|
||||
var hits: int = 0
|
||||
|
||||
@OnStart handler Boot { Input.action("go", 'l') } # 'l' == 108
|
||||
handler Sense(inputauto_st: mut InputautoState) phase Update { if Input.active("go") { inputauto_st.hits += 1 } }
|
||||
@OnQuit handler Report(inputauto_st: InputautoState) { print(inputauto_st.hits) }
|
||||
handler Sense phase Update { if Input.active("go") { hits += 1 } }
|
||||
@OnQuit handler Report { print(hits) }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue