-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
47 lines (35 loc) · 944 Bytes
/
main.lua
File metadata and controls
47 lines (35 loc) · 944 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
44
45
46
47
PiroGame = require 'PiroGame/PiroGame';
Game = require('Game');
function love.load(args)
game = Game:new(args);
end
function love.update(delta)
game:update(delta);
end
function love.draw()
game:draw();
end
function love.keypressed(key, code, isrepeat)
-- scene.eventManager:fireEvent(PiroGame.Input.KeyPressed:new(key, code, isrepeat))
-- print(key, code);
game:keypressed(key, code, isrepeat);
end
function love.keyreleased(key)
-- scene.eventManager:fireEvent(PiroGame.Input.KeyReleased:new(key))
game:keyreleased(key);
end
function love.mousepressed(x, y, button)
game:mousepressed(x, y, button);
end
function love.mousereleased(x, y, button)
game:mousereleased(x, y, button);
end
function love.mousemoved(x, y, dx, dy, touch)
game:mousemoved(x, y, dx, dy, touch);
end
function love.wheelmoved(x, y)
game:wheelmoved(x, y);
end
function love.resize(w, h)
game:resize(w, h);
end