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
|
|
@ -15,30 +15,32 @@
|
|||
# bin/ludic-dev game-build bin/ludicc examples/lang/scenes.ludic /tmp/scenes
|
||||
# printf 'aaaa' | /tmp/scenes
|
||||
program SceneDemo {
|
||||
var counter: int = 0
|
||||
state ScenedemoState {
|
||||
counter: int = 0
|
||||
}
|
||||
|
||||
handler Boot phase Start { counter = 0; print(1000) }
|
||||
handler Boot(scenedemo_st: mut ScenedemoState) phase Start { scenedemo_st.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 }
|
||||
handler Tick(scenedemo_st: mut ScenedemoState) phase Update {
|
||||
scenedemo_st.counter += 1
|
||||
print(100 + scenedemo_st.counter)
|
||||
if scenedemo_st.counter >= 2 { become Play }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scene Play {
|
||||
on enter { print(3); counter = 0 }
|
||||
on enter (scenedemo_st: mut ScenedemoState) { print(3); scenedemo_st.counter = 0 }
|
||||
on exit { print(4) }
|
||||
layer World {
|
||||
handler Step phase Update {
|
||||
counter += 1
|
||||
print(200 + counter)
|
||||
if counter >= 2 { quit() }
|
||||
handler Step(scenedemo_st: mut ScenedemoState) phase Update {
|
||||
scenedemo_st.counter += 1
|
||||
print(200 + scenedemo_st.counter)
|
||||
if scenedemo_st.counter >= 2 { quit() }
|
||||
}
|
||||
}
|
||||
layer Hud {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue