chore: make subgame worlds part of subgame folder

This commit is contained in:
Kazhnuz 2021-08-15 15:39:16 +02:00
parent 5b061fc797
commit 3d3fdc44c0
23 changed files with 19 additions and 27 deletions

View file

@ -2,7 +2,7 @@ local Scene = require("birb.modules.scenes")
local PlayStyle = Scene:extend() local PlayStyle = Scene:extend()
local PauseMenu = require("game.modules.subgames.pause") local PauseMenu = require("game.modules.subgames.pause")
local TestWorld = require("game.modules.world.parent") local TestWorld = require("game.modules.subgames.world.parent")
function PlayStyle:new(supportedLevels, missionfile) function PlayStyle:new(supportedLevels, missionfile)

View file

@ -1,4 +1,4 @@
local Parent = require "game.modules.world.actors.parent" local Parent = require "game.modules.subgames.world.actors.parent"
local Collectible = Parent:extend() local Collectible = Parent:extend()
function Collectible:new(world, x, y, z, w, h, d) function Collectible:new(world, x, y, z, w, h, d)

View file

@ -1,7 +1,7 @@
local ParentWorld = require "game.modules.world.parent" local ParentWorld = require "game.modules.subgames.world.parent"
local BattleWorld = ParentWorld:extend() local BattleWorld = ParentWorld:extend()
local customMap = require "game.modules.world.maps" local customMap = require "game.modules.subgames.world.maps"
function BattleWorld:new(scene, mapname) function BattleWorld:new(scene, mapname)
local mappath = game.utils.getMapPath("battle", mapname) local mappath = game.utils.getMapPath("battle", mapname)

View file

@ -0,0 +1,7 @@
local customMap = {}
customMap.Test = require "game.modules.subgames.world.maps.test"
customMap.Battle = require "game.modules.subgames.world.maps.battle"
customMap.Shoot = require "game.modules.subgames.world.maps.shoot"
return customMap

View file

@ -7,7 +7,7 @@ local TESTZONE = "forest"
local zoneDatas = require "datas.gamedata.maps.shoot.zones" local zoneDatas = require "datas.gamedata.maps.shoot.zones"
local Background = require "game.modules.drawing.parallaxBackground" local Background = require "game.modules.drawing.parallaxBackground"
local Chunk = require "game.modules.world.maps.tools.chunk" local Chunk = require "game.modules.subgames.world.maps.tools.chunk"
function ShootMap:new(world, maptype, mapname) function ShootMap:new(world, maptype, mapname)
ShootMap.super.new(self, world) ShootMap.super.new(self, world)

View file

@ -1,5 +1,5 @@
local Chunk = Object:extend() local Chunk = Object:extend()
local ChunkTerrain = require "game.modules.world.maps.tools.chunkterrain" local ChunkTerrain = require "game.modules.subgames.world.maps.tools.chunkterrain"
function Chunk:new(map, data) function Chunk:new(map, data)
self.map = map self.map = map

View file

@ -1,13 +1,13 @@
local World3D = require "birb.modules.world.world3D" local World3D = require "birb.modules.world.world3D"
local ParentWorld = World3D:extend() local ParentWorld = World3D:extend()
local customMap = require "game.modules.world.maps" local customMap = require "game.modules.subgames.world.maps"
function ParentWorld:new(scene, maptype, mapname) function ParentWorld:new(scene, maptype, mapname)
local mappath = game.utils.getMapPath("test", "test") local mappath = game.utils.getMapPath("test", "test")
self.customMap = customMap self.customMap = customMap
ParentWorld.super.new(self, scene, "game.modules.world.actors", mappath, maptype) ParentWorld.super.new(self, scene, "game.modules.subgames.world.actors", mappath, maptype)
self.mapname = mapname self.mapname = mapname
self.autorun = false self.autorun = false

View file

@ -1,7 +1,7 @@
local ParentWorld = require "game.modules.world.parent" local ParentWorld = require "game.modules.subgames.world.parent"
local ShootWorld = ParentWorld:extend() local ShootWorld = ParentWorld:extend()
local customMap = require "game.modules.world.maps" local customMap = require "game.modules.subgames.world.maps"
function ShootWorld:new(scene, mapname) function ShootWorld:new(scene, mapname)
local mappath = game.utils.getMapPath("shoot", mapname) local mappath = game.utils.getMapPath("shoot", mapname)

View file

@ -1,7 +0,0 @@
local customMap = {}
customMap.Test = require "game.modules.world.maps.test"
customMap.Battle = require "game.modules.world.maps.battle"
customMap.Shoot = require "game.modules.world.maps.shoot"
return customMap

View file

@ -24,9 +24,7 @@
local PlayStyle = require "game.modules.subgames" local PlayStyle = require "game.modules.subgames"
local MovePlayer = PlayStyle:extend() local MovePlayer = PlayStyle:extend()
local TestWorld = require "game.modules.world.parent" local BattleWorld = require "game.modules.subgames.world.battle"
local ShootWorld = require "game.modules.world.shoot"
local BattleWorld = require "game.modules.world.battle"
function MovePlayer:new(map) function MovePlayer:new(map)
self.map = map self.map = map
@ -34,9 +32,7 @@ function MovePlayer:new(map)
end end
function MovePlayer:initWorld() function MovePlayer:initWorld()
--ShootWorld(self, "testlevel.test1")
BattleWorld(self, self.map) BattleWorld(self, self.map)
--TestWorld(self)
end end
return MovePlayer return MovePlayer

View file

@ -24,9 +24,7 @@
local PlayStyle = require "game.modules.subgames" local PlayStyle = require "game.modules.subgames"
local MovePlayer = PlayStyle:extend() local MovePlayer = PlayStyle:extend()
local TestWorld = require "game.modules.world.parent" local ShootWorld = require "game.modules.subgames.world.shoot"
local ShootWorld = require "game.modules.world.shoot"
local BattleWorld = require "game.modules.world.battle"
function MovePlayer:new(map) function MovePlayer:new(map)
self.map = map self.map = map
@ -35,8 +33,6 @@ end
function MovePlayer:initWorld() function MovePlayer:initWorld()
ShootWorld(self, "testlevel.test1") ShootWorld(self, "testlevel.test1")
--BattleWorld(self, self.map)
--TestWorld(self)
end end
return MovePlayer return MovePlayer