aboutsummaryrefslogtreecommitdiff
path: root/src/main.moon
blob: b11bb74805d0bf1eb202c431e84265841ee37082 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
--Theme: repair
--Game: drydock - repair space ships (?)
require "ext"
print("Hello, world!")
ss = require "startscreen"
game = require "game"
state = require "global"
level_1 = require "level1"
complete = require "complete"
mod = ...

state.win = am.window {
	title: "ggj20",
	width: state.screen_width,
	height: state.screen_height,
	clear_color: vec4(0, 0, 0, 1)
}


r1 = ss.gen_scene!
--r1\append(complete.starfield!)
state.win.scene = r1
pcall(loadfile,"init.lua")
r1\action(coroutine.create(() ->
	while true
		if state.win\key_down("space")
			state.win.scene = am.group! ^ {game.gen_scene!, level_1.setup_level!}
		coroutine.yield!
))

	

-- This is a comment
-- to make sure that errors
-- are rewritten correctly

--error("success!")