-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmain.lua
More file actions
64 lines (50 loc) · 1.2 KB
/
Copy pathmain.lua
File metadata and controls
64 lines (50 loc) · 1.2 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
require 'fuccboi/fuccboi'
local Game = require 'Game'
function love.load()
fg.init()
game = Game()
fg.Gamestate.registerEvents()
fg.Gamestate.switch(game)
end
function love.update(dt)
fg.update(dt)
end
function love.draw()
fg.draw()
end
function love.keypressed(key)
fg.keypressed(key)
end
function love.keyreleased(key)
fg.keyreleased(key)
end
function love.mousepressed(x, y, button)
fg.mousepressed(button)
end
function love.mousereleased(x, y, button)
fg.mousereleased(button)
end
function love.gamepadpressed(joystick, button)
fg.gamepadpressed(joystick, button)
end
function love.gamepadreleased(joystick, button)
fg.gamepadreleased(joystick, button)
end
function love.gamepadaxis(joystick, axis, newvalue)
fg.gamepadaxis(joystick, axis, newvalue)
end
function love.textinput(text)
fg.textinput(text)
end
function love.resize(w, h)
fg.resize(w, h)
end
function love.run()
math.randomseed(os.time())
math.random() math.random()
if love.math then love.math.setRandomSeed(os.time()) end
if love.event then love.event.pump() end
if love.load then love.load(arg) end
if love.timer then love.timer.step() end
fg.run()
end