-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.lua
50 lines (39 loc) · 1.22 KB
/
main.lua
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
require "globals"
package.cpath = package.cpath .. ";/Users/gw/.vscode/extensions/tangzx.emmylua-0.3.49/debugger/emmy/mac/emmy_core.dylib"
-- local dbg = require("emmy_core")
-- dbg.tcpListen("localhost", 9966)
local shader
function love.load()
print("") -- Easier readability if newlined at beginning of program.
Player = require("states.player")()
WINDOW = require("libs.window")()
House = require "house.house"
Fade = require "house.overlays.fade"
Flashlight = require "house.overlays.flashlight"
love.window.setTitle("Traces")
shader = love.graphics.newShader("assets/PlayDateShader.fs")
GameState.registerEvents()
GameState.switch(require "states.start")
end
function love.update(dt)
Timer.update(dt)
end
function love.quit()
if WINDOW ~= nil then WINDOW:save() end
if Player ~= nil then Player:save() end
end
function love:draw()
love.graphics.setDefaultFilter("nearest", "nearest", 1)
love.graphics.setLineStyle("rough")
love.graphics.setShader()
GameState.draw()
end
function love.keypressed(key)
if key == "1" then
WINDOW:resize(1)
elseif key == "2" then
WINDOW:resize(2)
elseif key == "3" then
WINDOW:resize(3)
end
end