wip(0.S3): packages and examples migrated in one run - ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d490d4f9f1
commit
3eda72e8c2
172 changed files with 3094 additions and 2966 deletions
|
|
@ -8,10 +8,12 @@ program Managers {
|
|||
property Tag { n: int = 0 }
|
||||
model Thing { Position, Body, Sprite, Tag, TopDown }
|
||||
model WorldRules { Solids }
|
||||
var frames: int = 0
|
||||
handler Tick phase Update {
|
||||
frames += 1
|
||||
if frames == 1 {
|
||||
state ManagersState {
|
||||
frames: int = 0
|
||||
}
|
||||
handler Tick(managers_st: mut ManagersState) phase Update {
|
||||
managers_st.frames += 1
|
||||
if managers_st.frames == 1 {
|
||||
Map.size(10, 8)
|
||||
Map.fill(glyph: '.')
|
||||
Map.border(glyph: '#')
|
||||
|
|
@ -36,7 +38,7 @@ program Managers {
|
|||
Fx.number(x: 20, y: 20, value: 42, color: 0xffff00)
|
||||
spawn Thing { Position { x: 20, y: 20 }, Sprite { id: 5, move_id: 9, face: 1, flash: 3, blink: 6 }, TopDown { want_x: -1 } }
|
||||
}
|
||||
if frames == 3 { print(Map.is_solid(x: 0, y: 0) * 10 + Map.is_solid_at(x: 40, y: 40)) } # 10
|
||||
if frames == 5 { for (s, t) in query [Sprite, Tag] { print(s.flip * 100 + s.flash * 10 + s.blink) }; quit() } # 102
|
||||
if managers_st.frames == 3 { print(Map.is_solid(x: 0, y: 0) * 10 + Map.is_solid_at(x: 40, y: 40)) } # 10
|
||||
if managers_st.frames == 5 { for (s, t) in query [Sprite, Tag] { print(s.flip * 100 + s.flash * 10 + s.blink) }; quit() } # 102
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue