blob: 1e62e16cc4bcff1722536b42470b73601fba75b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--Hodls global state
mod = ...
mod.screen_width = 1024
mod.screen_height = 512
mod.layers = am.group!
mod.current_level = 0
mod.layer_tbl = {}
mod.add_layer = (layer) ->
mod.layers\append(layer.node)
table.insert(mod.layer_tbl,layer)
mod.clear_layers = () ->
mod.layers\remove_all!
mod.layer_tbl = {}
mod.play = (seed) ->
mod.layers\action(am.play(seed,false,1,1))
mod
|