-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.lua
53 lines (47 loc) · 1.42 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
51
52
love.graphics.setDefaultFilter("nearest", "nearest")
pprint = require 'lib.pprint'
function table.clone(org)
return { table.unpack(org) }
end
DEBUG = false
STATE = {
properties = { population = 0, money = 50 },
buildings = {
{ x = 1, y = 1, building = "small_park" },
},
hand = {},
discardPile = { },
drawPile = {"small_office", "small_generator", "small_residential"},
currentTurnEffects = {},
cars = {},
helis = {},
}
require 'lib.atlas'
require 'lib.helpers.core_funcs'
require 'lib.load_all_scripts'
Gamestate = require "lib.gamestate"
function love.load()
scripts.rendering.renderMap()
scripts.rendering.loadAssets()
local music = love.audio.newSource("assets/main.mp3", "stream")
music:setVolume(0.7)
music:setLooping(true)
music:play()
atlas = Atlas(1, 1, true, '', nil, false, false)
for _, v in pairs(GFX) do
v:addQuads()
end
Gamestate.registerEvents()
Gamestate.switch(scripts.states.menu)
if DEBUG then
local inspect = require "lib.inspect"
require "lib.lovebird".monfn = function()
return "<b>Draw: </b>" .. inspect(STATE.drawPile) ..
"<br/><b>Discard: </b>" .. inspect(STATE.discardPile) ..
"<br/><b>Hand: </b>" .. inspect(STATE.hand) ..
"<br/><b>Gamestate: </b>" .. Gamestate.current().name
end
end
end
function love.draw()
end