Ajout des derniers développement #1

Merged
kazhnuz merged 68 commits from chronicles-cbs into master 2020-08-02 11:14:18 +02:00
Showing only changes of commit 00396522fb - Show all commits

View file

@ -36,13 +36,17 @@ function CharacterManager:new(controller)
end end
function CharacterManager:init() function CharacterManager:init()
for k, v in pairs(self.namelist) do for k, name in pairs(self.namelist) do
local dir = "datas/gamedata/characters/" .. v .. "/init.lua" if (self:charDataExists(name)) then
self:initCharacter(name)
end
end
end
function CharacterManager:charDataExists(name)
local dir = "datas/gamedata/characters/" .. name .. "/init.lua"
local fileinfo = love.filesystem.getInfo(dir) local fileinfo = love.filesystem.getInfo(dir)
if fileinfo ~= nil then return (fileinfo ~= nil)
self:initCharacter(v)
end
end
end end
function CharacterManager:getCharacterData(charname) function CharacterManager:getCharacterData(charname)