2021-08-15 15:39:16 +02:00
|
|
|
local ParentWorld = require "game.modules.subgames.world.parent"
|
2020-08-16 10:52:00 +02:00
|
|
|
local ShootWorld = ParentWorld:extend()
|
|
|
|
|
2021-08-15 15:39:16 +02:00
|
|
|
local customMap = require "game.modules.subgames.world.maps"
|
2020-08-16 10:52:00 +02:00
|
|
|
|
|
|
|
function ShootWorld:new(scene, mapname)
|
|
|
|
local mappath = game.utils.getMapPath("shoot", mapname)
|
|
|
|
ShootWorld.super.new(self, scene, "shoot", mapname)
|
|
|
|
|
|
|
|
self.mapname = mapname
|
|
|
|
self.autorun = true
|
|
|
|
end
|
|
|
|
|
|
|
|
function ShootWorld:getViewCenter(x, y)
|
|
|
|
return x+128, y-16
|
|
|
|
end
|
|
|
|
|
|
|
|
function ShootWorld:createMapController()
|
|
|
|
self.customMap.Shoot(self, self.maptype, self.mapname)
|
|
|
|
self.cameras:lockY(10)
|
|
|
|
end
|
|
|
|
|
|
|
|
return ShootWorld
|