mostly art stuffgit add -A
BIN
art/food/beer_mug.png
Normal file
|
After Width: | Height: | Size: 573 B |
BIN
art/food/orig/beer_mug.png
Normal file
|
After Width: | Height: | Size: 3.5 MiB |
BIN
art/food/processed/beer_mug_b.png
Normal file
|
After Width: | Height: | Size: 312 B |
BIN
art/food/processed/beer_mug_g.png
Normal file
|
After Width: | Height: | Size: 301 B |
BIN
art/food/processed/beer_mug_r.png
Normal file
|
After Width: | Height: | Size: 301 B |
BIN
art/food/processed/beer_mug_reduced.png
Normal file
|
After Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 403 B After Width: | Height: | Size: 403 B |
|
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 312 B |
|
Before Width: | Height: | Size: 308 B After Width: | Height: | Size: 308 B |
|
Before Width: | Height: | Size: 456 B After Width: | Height: | Size: 456 B |
BIN
art/house/books_stack.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
art/house/bookshelf.png
Normal file
|
After Width: | Height: | Size: 3 KiB |
BIN
art/house/orig/book_open.jpg
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
art/house/orig/books_stack.png
Normal file
|
After Width: | Height: | Size: 155 KiB |
BIN
art/house/orig/bookshelf.png
Normal file
|
After Width: | Height: | Size: 123 KiB |
BIN
art/house/orig/toilet.png
Normal file
|
After Width: | Height: | Size: 167 KiB |
BIN
art/house/processed/books_stack_b.png
Normal file
|
After Width: | Height: | Size: 404 B |
BIN
art/house/processed/books_stack_g.png
Normal file
|
After Width: | Height: | Size: 401 B |
BIN
art/house/processed/books_stack_r.png
Normal file
|
After Width: | Height: | Size: 406 B |
BIN
art/house/processed/books_stack_reduced.png
Normal file
|
After Width: | Height: | Size: 501 B |
BIN
art/house/processed/bookshelf_b.png
Normal file
|
After Width: | Height: | Size: 406 B |
BIN
art/house/processed/bookshelf_g.png
Normal file
|
After Width: | Height: | Size: 514 B |
BIN
art/house/processed/bookshelf_r.png
Normal file
|
After Width: | Height: | Size: 514 B |
BIN
art/house/processed/bookshelf_reduced.png
Normal file
|
After Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 293 B |
|
Before Width: | Height: | Size: 302 B After Width: | Height: | Size: 302 B |
|
Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 300 B |
|
Before Width: | Height: | Size: 358 B After Width: | Height: | Size: 358 B |
BIN
art/house/processed/toilet_b.png
Normal file
|
After Width: | Height: | Size: 350 B |
BIN
art/house/processed/toilet_g.png
Normal file
|
After Width: | Height: | Size: 350 B |
BIN
art/house/processed/toilet_r.png
Normal file
|
After Width: | Height: | Size: 350 B |
BIN
art/house/processed/toilet_reduced.png
Normal file
|
After Width: | Height: | Size: 379 B |
BIN
art/house/toilet.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
art/switch_pressed.png
Normal file
|
After Width: | Height: | Size: 114 B |
1
door.lua
|
|
@ -58,7 +58,6 @@ function Door:setColors(colors)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Door:unlock()
|
function Door:unlock()
|
||||||
print("wow")
|
|
||||||
self.locked = false
|
self.locked = false
|
||||||
self.collision = "none"
|
self.collision = "none"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,9 @@ function Entity:move(axis, direction)
|
||||||
self[axis] = self[axis] + direction
|
self[axis] = self[axis] + direction
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Entity:setSprite(sprite)
|
||||||
|
self.sprite = sprite
|
||||||
|
end
|
||||||
|
|
||||||
function Entity:sha()
|
function Entity:sha()
|
||||||
return math.random(-worldSha, worldSha) * .5
|
return math.random(-worldSha, worldSha) * .5
|
||||||
|
|
|
||||||
3
main.lua
|
|
@ -1,3 +1,6 @@
|
||||||
|
love.graphics.setDefaultFilter("linear", "nearest")
|
||||||
|
|
||||||
|
|
||||||
class = require "libs/middleclass"
|
class = require "libs/middleclass"
|
||||||
Timer = require "libs/hump/timer"
|
Timer = require "libs/hump/timer"
|
||||||
sfxr = require "libs/sfxrlua/sfxr"
|
sfxr = require "libs/sfxrlua/sfxr"
|
||||||
|
|
|
||||||
7
room.lua
|
|
@ -59,11 +59,11 @@ function Room:initialize(t)
|
||||||
-- if active then self.collideables[color]["n: " .. x .. ", " .. y] = Ass:new(x, y, color, "animals/processed/", "me_rach") end
|
-- if active then self.collideables[color]["n: " .. x .. ", " .. y] = Ass:new(x, y, color, "animals/processed/", "me_rach") end
|
||||||
|
|
||||||
local x, y = 1, 1
|
local x, y = 1, 1
|
||||||
if active then self.collideables[color]["n: " .. x .. ", " .. y] = Ass:new(x, y, color, "tech/processed/", "mac_smaller") end
|
if active then self.collideables[color]["n: " .. x .. ", " .. y] = Ass:new(x, y, color, "house/processed/", "toilet") end
|
||||||
self.collideables[color]["n: " .. x .. ", " .. y]:getOccupiedCells()
|
self.collideables[color]["n: " .. x .. ", " .. y]:getOccupiedCells()
|
||||||
|
|
||||||
local x, y = 7, 7
|
local x, y = 7, 7
|
||||||
if active then self.collideables[color]["n: " .. x .. ", " .. y] = Ass:new(x, y, color, "tech/processed/", "cd") end
|
if active then self.collideables[color]["n: " .. x .. ", " .. y] = Ass:new(x, y, color, "food/processed/", "beer_mug") end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -348,10 +348,11 @@ function Room:switchCheck()
|
||||||
--switch is on
|
--switch is on
|
||||||
switch:activate()
|
switch:activate()
|
||||||
table.insert(onSwitches, switch) --doesn't rly matter what we put here as long as it's true-y
|
table.insert(onSwitches, switch) --doesn't rly matter what we put here as long as it's true-y
|
||||||
|
else
|
||||||
|
switch:deactivate()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if #onSwitches == #switchArray then doorsToUnlock[color] = true else doorsToUnlock[color] = false end
|
if #onSwitches == #switchArray then doorsToUnlock[color] = true else doorsToUnlock[color] = false end
|
||||||
print(color, doorsToUnlock[color])
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return doorsToUnlock
|
return doorsToUnlock
|
||||||
|
|
|
||||||
20
switch.lua
|
|
@ -2,19 +2,33 @@ require "entity"
|
||||||
|
|
||||||
Switch = class("Switch", Entity)
|
Switch = class("Switch", Entity)
|
||||||
|
|
||||||
|
Switch.static.sprites = {
|
||||||
|
red = love.graphics.newImage("art/switch_r.png"),
|
||||||
|
green = love.graphics.newImage("art/switch_g.png"),
|
||||||
|
blue = love.graphics.newImage("art/switch_b.png"),
|
||||||
|
pressed = love.graphics.newImage("art/switch_pressed.png")
|
||||||
|
}
|
||||||
|
|
||||||
function Switch:initialize(x, y, color)
|
function Switch:initialize(x, y, color)
|
||||||
Entity.initialize(self, {
|
Entity.initialize(self, {
|
||||||
x = x,
|
x = x,
|
||||||
y = y,
|
y = y,
|
||||||
color = color,
|
color = color,
|
||||||
collision = "none", --switches are floor elements that can't be pushed or bloc movement!!
|
collision = "none", --switches are floor elements that can't be pushed or bloc movement!!
|
||||||
sprite = switchSprite[color]
|
sprite = Switch.sprites[color]
|
||||||
})
|
})
|
||||||
|
|
||||||
self.activated = false
|
self.activated = false
|
||||||
end
|
end
|
||||||
|
|
||||||
function Switch:activate()
|
function Switch:activate()
|
||||||
if self.activated == false then self.activated = true end
|
if self.activated == false then
|
||||||
print("i am: ", self.activated)
|
self.activated = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function Switch:deactivate()
|
||||||
|
if self.activated == true then
|
||||||
|
self.activated = false
|
||||||
|
end
|
||||||
end
|
end
|
||||||