sonic-radiance/sonic-radiance.love/game/skills.lua

19 lines
481 B
Lua

local SkillManager = Object:extend()
function SkillManager:new(controller)
self.controller = controller
end
function SkillManager:getSkillData(skillname)
if self:skillDataExists(skillname) then
return require("datas.gamedata.skills." .. skillname )
end
end
function SkillManager:skillDataExists(skillname)
local dir = "datas/gamedata/skills/" .. skillname .. ".lua"
local fileinfo = love.filesystem.getInfo(dir)
return (fileinfo ~= nil)
end
return SkillManager