wowowowowowowo so much stuff

This commit is contained in:
0x81c 2015-03-14 05:36:02 -04:00
parent fe21cb61e3
commit 2f40eaf000
249 changed files with 391 additions and 20 deletions

View file

@ -1,6 +1,8 @@
class = require "libs/middleclass"
Timer = require "libs/hump/timer"
sfxr = require "libs/sfxrlua/sfxr"
json = require "libs/json4lua/json/json"
require "_helpers"
require "input"
require "color"
require "room"
@ -20,17 +22,19 @@ function love.load()
currentRoom = Room:new{
player = {
red = {x = 3, y = 5},
green = {x = 4, y = 3},
blue = {x = 3, y = 10}
red = {x = 5, y = 5},
green = {x = 5, y = 5},
blue = {x = 5, y = 5}
}
}
end
function love.update(dt)
Input:handler()
currentRoom:update()
if love.keyboard.isDown("w") then worldSha = worldSha + 1 end
if love.keyboard.isDown("s") then worldSha = worldSha - 1 end
end
function love.draw()
@ -75,6 +79,12 @@ function love.keypressed(key)
local c = Input.playerColor(key)
currentRoom:switchPlayer(c)
end
if key == "w" then
worldSha = worldSha + 1
end
if key == "s" then
worldSha = worldSha - 1
end
end
function _initDefaults()
@ -97,6 +107,8 @@ end
function _initGridVars()
gridWidth, gridHeight = 11, 11
drawScale = width / gridWidth / 16
worldSha = 1
end
function _initSounds()
@ -123,6 +135,35 @@ function loadSprites()
green = love.graphics.newImage("art/wall_g.png"),
blue = love.graphics.newImage("art/wall_b.png")
}
waterSprite = {
red = love.graphics.newImage("art/nature/processed/water_r.png"),
green = love.graphics.newImage("art/nature/processed/water_g.png"),
blue = love.graphics.newImage("art/nature/processed/water_b.png")
}
npcSprites = {
}
-- local artPieceJsonString
-- for line in io.lines("art/museum/to_process/art.json") do
-- artPieceJsonString = line
-- end
-- artPieceSpritesTable = json.decode(artPieceJsonString)
-- print(artPieceSpritesTable["saturn_son"]["red"])
-- print(artSpriteJson)
-- -- sets the default input file as test.lua
-- io.input(artSpriteJson)
-- -- prints the first line of the file
-- artSpriteJsonString = io.read()
-- -- closes the open file
-- io.close(artSpriteJson)
-- artSpriteTable = json.decode(artSpriteJsonString)
-- print(artSpriteTable)
artifactSprite = love.graphics.newImage("art/process/cone.png")
end