aboutsummaryrefslogtreecommitdiffstats
path: root/examples/steps.aup
blob: ee4eb47f4f9edf78e338f52f57a6a85d5139ecff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# if / else and else if; the first matching branch runs.
state level = 0
state band = 0
input up = key ArrowUp
input down = key ArrowDown
view shown = band

on up.down {
  level = level + 1
}

on down.down {
  level = level - 1
}

on frame {
  if level > 2 {
    band = 2
  } else if level > 0 {
    band = 1
  } else {
    band = 0
  }
}