scenes/levels: remove unused controller

They'll be put back again when they'll be usefull
This commit is contained in:
Kazhnuz 2019-03-03 17:08:11 +01:00
parent 6cd1e1c4ae
commit 1eb7fd9c91
2 changed files with 0 additions and 68 deletions

View File

@ -1,66 +0,0 @@
function Level:setDebugMode(debugmode)
self.debugmode = debugmode
self.drawdebug = false
end
function Level:debugKey(key)
if (key == "l") and self.drawdebug then
local mousex, mousey = self:cameraWorldCoord(love.mouse.getPosition())
mousex, mousey = pixeliseCoord(mousex, mousey, 16)
Loot(self.world, 0, 0, mousex, mousey)
end
if (key == "r") and self.drawdebug then
self:launchMission()
end
if (key == "tab") then
self.drawdebug = invertBool(self.drawdebug)
end
end
function Level:debugPlayerCoord()
local playerList = self:getPlayers()
local string = "total players : " .. #playerList .. "\n"
for i,v in ipairs(playerList) do
v.id = i
local x, y = utils.math.floorCoord(v.x, v.y)
string = string .. "p" .. v.id .. " : " .. x .. ";" .. y .. "\n"
end
return string
end
function Level:drawHitbox(box, r, g, b)
drawBox(box.x, box.y, box.w, box.h, r, g, b)
end
function Level:debugDrawCursor()
local mousex, mousey = self:cameraWorldCoord(love.mouse.getPosition())
mousex, mousey = pixeliseCoord(mousex, mousey, 16)
mousex, mousey = self:cameraCoords(mousex, mousey)
color = {255,255,255}
drawBox(mousex, mousey, 16, 16, 255, 255, 255)
end
function Level:drawCollisions()
if (self.drawdebug == true) then
for _,block in ipairs(self.blocks) do
if (block.collType == "wall") then
self:drawHitbox(block, 0,0,0)
elseif (block.collType == "platform") then
self:drawHitbox(block, 64, 64, 64)
end
end
end
end
function Level:drawDebugHUD()
if (self.drawdebug == true) then
self:debugDrawCursor()
assets.fonts["small"]:set()
local playercoord = self:debugPlayerCoord()
local entityNumbers = self.world:countItems()
love.graphics.print(playercoord .. self.activeObjects .. "/" .. entityNumbers, 8, 8)
end
end

View File

@ -1,2 +0,0 @@
function Level:pauseUpdate()
end