-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.moon
More file actions
44 lines (33 loc) · 838 Bytes
/
main.moon
File metadata and controls
44 lines (33 loc) · 838 Bytes
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
38
39
40
41
42
43
require "lovekit.all"
if pcall(-> require"inotify")
require "lovekit.reloader"
{graphics: g} = love
import World from require "game"
export DEBUG = false
load_font = (img, chars)->
font_image = imgfy img
g.newImageFont font_image.tex, chars
love.load = ->
fonts = {
default: load_font "images/font.png",
[[ abcdefghijklmnopqrstuvwxyz-1234567890!.,:;'"?$&]]
}
g.setFont fonts.default
g.setBackgroundColor 10, 10, 10
export AUDIO = Audio "sounds"
AUDIO\preload {
"bullet_hit_wall"
"enemy_die"
"enemy_hit"
"enemy_shoot"
"lose_shield"
"player_die"
"powerup"
"shoot"
"start_game"
"upgrade"
}
export CONTROLLER = Controller GAME_CONFIG.keys, "auto"
export DISPATCHER = Dispatcher World!
DISPATCHER.default_transition = FadeTransition
DISPATCHER\bind love