49 lines
1.1 KiB
Lua
49 lines
1.1 KiB
Lua
local BaseMap = require "core.modules.world.maps.parent"
|
|
local ShootMap = BaseMap:extend()
|
|
|
|
local TILESIZE = 31
|
|
local TESTZONE = "forest"
|
|
|
|
local zoneDatas = require "datas.gamedata.maps.shoot.zones"
|
|
local Background = require "game.modules.drawing.parallaxBackground"
|
|
|
|
|
|
function ShootMap:new(world, maptype, mapname)
|
|
ShootMap.super.new(self, world)
|
|
|
|
self:setPadding(0, 0, 0, 0)
|
|
self.parallaxBackground = Background(world.scene, 5, 1, "tunnel")
|
|
end
|
|
|
|
function ShootMap:loadCollisions()
|
|
local w, h = self:getDimensions()
|
|
self.world:newCollision("floor", 0, 0, -16, w, h, 16)
|
|
end
|
|
|
|
function ShootMap:addBlock(x, y, w, h, top, bottom)
|
|
-- Empty Placeholder function
|
|
end
|
|
|
|
function ShootMap:getDimensions()
|
|
return 3000, 100
|
|
end
|
|
|
|
function ShootMap:loadPlayers()
|
|
self.world:addPlayer(16, 50, 0, 1)
|
|
end
|
|
|
|
function ShootMap:loadActors()
|
|
-- Empty Placeholder function
|
|
end
|
|
|
|
function ShootMap:draw()
|
|
for i=1, 10 do
|
|
--love.graphics.draw(self.texture.floor, ((i-1)*31*16), 0)
|
|
end
|
|
end
|
|
|
|
function ShootMap:drawParallax(x, y, w, h)
|
|
self.parallaxBackground:drawParallax(x, y, w, h)
|
|
end
|
|
|
|
return ShootMap
|