2015-03-11 20:11:29 -04:00
|
|
|
Room = class("Room")
|
2015-03-11 21:41:02 -04:00
|
|
|
|
2015-03-11 21:08:15 -04:00
|
|
|
require "player"
|
2015-03-11 20:11:29 -04:00
|
|
|
|
2015-03-11 21:08:15 -04:00
|
|
|
function Room:initialize(t)
|
|
|
|
|
self.exits = t.exits
|
|
|
|
|
self.name = t.name
|
|
|
|
|
self.player = {}
|
|
|
|
|
|
2015-03-11 21:41:02 -04:00
|
|
|
for color, coords in pairs(t.player) do
|
2015-03-11 21:08:15 -04:00
|
|
|
self.player[color] = Player:new(coords.x, coords.y, color)
|
|
|
|
|
end
|
2015-03-11 20:11:29 -04:00
|
|
|
|
2015-03-11 21:41:02 -04:00
|
|
|
local crate
|
|
|
|
|
local box
|
|
|
|
|
local blox
|
|
|
|
|
local tile
|
|
|
|
|
|
2015-03-11 20:11:29 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
2015-03-11 21:41:02 -04:00
|
|
|
function Room:update(dt)
|
|
|
|
|
for color, player in pairs(self.player) do
|
|
|
|
|
player:update(dt)
|
|
|
|
|
end
|
2015-03-11 20:11:29 -04:00
|
|
|
end
|
|
|
|
|
|
2015-03-11 21:41:02 -04:00
|
|
|
function Room:draw()
|
|
|
|
|
for color, player in pairs(self.player) do
|
|
|
|
|
player:draw()
|
|
|
|
|
end
|
2015-03-11 21:08:15 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function Room:tick()
|
|
|
|
|
self:nextRoomCheck()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function Room:nextRoomCheck()
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function nextRoom()
|
2015-03-11 21:41:02 -04:00
|
|
|
print("next room!!!")
|
2015-03-11 21:08:15 -04:00
|
|
|
-- currentRoom = Room:new{
|
|
|
|
|
|
|
|
|
|
-- }
|
2015-03-11 20:11:29 -04:00
|
|
|
end
|