sonic-radiance/sonic-radiance.love/scenes/battles/world/map.lua

51 lines
1.1 KiB
Lua
Raw Normal View History

2022-05-12 17:07:27 +02:00
local BaseMap = require "birb.modules.world.maps.parent"
local CBSMap = BaseMap:extend()
local TILESIZE = 31
local TESTZONE = "forest"
local zoneDatas = require "datas.gamedata.maps.shoot.zones"
local Background = require "game.modules.drawing.parallaxBackground"
function CBSMap:new(world, type)
CBSMap.super.new(self, world)
self:setPadding(0, 0, 0, 0)
self.parallaxBackground = Background(world.scene, 6, 0, TESTZONE)
self.layout = {}
self.chunklist = {}
end
function CBSMap:loadCollisions()
local w, h = self:getDimensions()
self.world:newCollision("fakefloor", 0, 0, -48, w, h, 48)
self.world:newCollision("invisible", 0, 0, -48, w, h, 48)
end
function CBSMap:addBlock(x, y, w, h, top, bottom)
-- Empty Placeholder function
end
function CBSMap:getDimensions()
return 424, 120
end
function CBSMap:loadPlayers()
self.world:addPlayer(16, 50, 0, 1)
end
function CBSMap:loadActors()
-- Empty Placeholder function
end
function CBSMap:drawParallax(x, y, w, h)
self.parallaxBackground:drawParallax(x, y, w, h)
end
function CBSMap:draw()
end
return CBSMap