-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
27 lines (24 loc) · 860 Bytes
/
main.lua
File metadata and controls
27 lines (24 loc) · 860 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
Class = require('lib.hump.class')
Gamestate = require('lib.hump.gamestate')
-- menu = require('gamestates.menu')
game = require('gamestates.game')
function love.load()
love.mouse.setVisible(false)
g = love.graphics
keyDown = love.keyboard.isDown
-- global.effect = g.newPixelEffect [[
-- extern Image target_image;
-- extern number s; // from 0 to 1
-- vec4 effect(vec4 color, Image texture, vec2 tc, vec2 pc )
-- {
-- vec4 pixel_from = Texel(texture, tc);
-- vec4 pixel_to = Texel(target_image, tc);
-- // you don't have to add the individual channels here
-- return (1.0 - s) * pixel_from + s * pixel_to;
-- // you could also write:
-- // return (1.0 - s) * Texel(texture,tx) + s * Texel(target_image, tc);
-- }
-- ]]
Gamestate.registerEvents()
Gamestate.switch(game)
end