blob: d5cf5d9ff62375b8265e59199f25e63c4ec838c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# Space toggles visibility; Right arrow moves a position that wraps.
state visible = true
state position = 120
input toggle = key Space
input move = key ArrowRight
view marker_x = position
view marker_radius = if visible { 24 } else { 0 }
view tile_x = position - 24
view value = visible
on toggle.down {
visible = !visible
}
on move.down {
position = position + 40
if position > 560 {
position = 80
}
}
|