sonic-radiance/sonic-radiance.love/game/modules/world/shoot.lua
Kazhnuz 70ed18202d feat: backport code from bluestreak
It'll give us the following features
- Support for autorun in shoot-style maps
- Pause menu in subgames
- Chunk in shoot maps
- Rings
2020-08-16 10:52:00 +02:00

23 lines
568 B
Lua

local ParentWorld = require "game.modules.world.parent"
local ShootWorld = ParentWorld:extend()
local customMap = require "game.modules.world.maps"
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