Ajout des derniers développement #1

Merged
kazhnuz merged 68 commits from chronicles-cbs into master 2020-08-02 11:14:18 +02:00
4 changed files with 21 additions and 9 deletions
Showing only changes of commit cf377f15b8 - Show all commits

View file

@ -0,0 +1 @@
return {"aroom", "bhighway", "crouge", "cruins", "ebeach", "ghill", "hsummit", "library", "mdepot", "tlab"}

View file

@ -65,14 +65,19 @@ function menu.SubMenuWidget:action()
end
-- SceneWidget
function menu.SceneWidget:new(scene, menuName, newScene, newSceneName)
function menu.SceneWidget:new(scene, menuName, newScene, newSceneName, sceneArgument)
menu.SceneWidget.super.new(self, scene, menuName, newSceneName)
self.newScene = newScene
self.sceneArgument = sceneArgument
end
function menu.SceneWidget:action()
if (self.sceneArgument ~= nil) then
self.newScene(self.sceneArgument)
else
self.newScene()
end
end
return menu

View file

@ -62,9 +62,17 @@ end
function DebugMenu:buildOtherMenu()
self:addSubMenu("other", "BaseMenu", "Other gameplay")
menu.commons.SceneWidget(self, "other", scenes.test, "Sonic Battle Maps")
self:addSubMenu("battle", "other", "Sonic Battle Maps")
local mapList = require "datas.gamedata.maps.battle"
for i, name in ipairs(mapList) do
local mapData = require("datas.gamedata.maps.battle." .. name)
local trueName = mapData.name
menu.commons.SceneWidget(self, "battle", scenes.test, trueName, name)
end
menu.commons.SceneWidget(self, "other", scenes.test2, "Shadow Shot Maps")
menu.commons.SubMenuWidget(self, "battle", "other", "Back")
menu.commons.SubMenuWidget(self, "other", "BaseMenu", "Back")
end

View file

@ -26,17 +26,15 @@ local MovePlayer = Scene:extend()
local World = require "game.modules.world"
function MovePlayer:new(playerNumber, cameraMode)
local playerNumber = playerNumber or 1
local cameraMode = cameraMode or "split"
function MovePlayer:new(map)
MovePlayer.super.new(self)
self.assets:batchImport("scenes.test_scene.assets")
World(self, "battle", "tlab")
World(self, "battle", map)
self.world:setPlayerNumber(playerNumber)
self.world.cameras:setMode(cameraMode)
self.world:setPlayerNumber(1)
self.world.cameras:setMode("split")
self.world:loadMap()
end