scenes/levels: add new map handling function and wrapper
This commit is contained in:
parent
26e9d7c4d5
commit
581fd9952e
|
@ -110,6 +110,22 @@ function Level:getEntities()
|
|||
return self.entities:getItems()
|
||||
end
|
||||
|
||||
-- MAP FUNCTIONS
|
||||
-- All map wrappers
|
||||
|
||||
function Level:getDimensions()
|
||||
return self.map.width * self.map.tilewidth,
|
||||
self.map.height * self.map.tileheight
|
||||
end
|
||||
|
||||
function Level:setBackgroundColor(r, g, b)
|
||||
self.backcolor = {r, g, b}
|
||||
end
|
||||
|
||||
function Level:getBackgroundColor()
|
||||
return self.backcolor[1]/256, self.backcolor[2]/256, self.backcolor[3]/256
|
||||
end
|
||||
|
||||
-- UPDATE FUNCTIONS
|
||||
-- All update functions
|
||||
|
||||
|
|
Loading…
Reference in New Issue