2021-11-25 11:28:31 +01:00
|
|
|
local ParentWorld = require "game.modules.subgames.world.parent"
|
2019-12-28 14:13:19 +01:00
|
|
|
local ShootWorld = ParentWorld:extend()
|
|
|
|
|
2021-11-25 11:28:31 +01:00
|
|
|
local customMap = require "game.modules.subgames.world.maps"
|
2019-12-28 14:13:19 +01:00
|
|
|
|
|
|
|
function ShootWorld:new(scene, mapname)
|
|
|
|
local mappath = game.utils.getMapPath("shoot", mapname)
|
|
|
|
ShootWorld.super.new(self, scene, "shoot", mapname)
|
|
|
|
|
|
|
|
self.mapname = mapname
|
2020-02-02 08:27:33 +01:00
|
|
|
self.autorun = true
|
2019-12-28 14:13:19 +01:00
|
|
|
end
|
|
|
|
|
2019-12-28 14:17:58 +01:00
|
|
|
function ShootWorld:getViewCenter(x, y)
|
|
|
|
return x+128, y-16
|
|
|
|
end
|
|
|
|
|
2019-12-28 14:13:19 +01:00
|
|
|
function ShootWorld:createMapController()
|
|
|
|
self.customMap.Shoot(self, self.maptype, self.mapname)
|
|
|
|
self.cameras:lockY(10)
|
|
|
|
end
|
|
|
|
|
|
|
|
return ShootWorld
|