---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by DY.
--- DateTime: 2020/9/10 16:33
---
local Config = Config or class("ArSettingConfig");

local ColorGrade = {
    {Path="data/public/colorgrade/0_Default.png",Name="默认"},
    {Path="data/public/colorgrade/1_DarkDay.png",Name="暗日"},
    {Path="data/public/colorgrade/2_Bibo.png",Name="碧波"},
    {Path="data/public/colorgrade/3_Amber.png",Name="琥珀"},
    {Path="data/public/colorgrade/4_OldDream.png",Name="旧梦"},
    {Path="data/public/colorgrade/5_Agate.png",Name="玛瑙"},
    {Path="data/public/colorgrade/6_Sunset.png",Name="日落"},
    {Path="data/public/colorgrade/7_Time.png",Name="时光"},
    {Path="data/public/colorgrade/8_Tianhe.png",Name="天河"},
    {Path="data/public/colorgrade/9_Warm.png",Name="温暖"},
    {Path="data/public/colorgrade/10_Gloomy.png",Name="幽暗"},
    {Path="data/public/colorgrade/11_Chalcedony.png",Name="玉髓"},
    {Path="data/public/colorgrade/12_MoonLight.png",Name="月光"},
    {Path="data/public/colorgrade/13_PurpleJade.png",Name="紫翠玉"},
    {Path="data/public/colorgrade/14_PurpleYellowCrystal.png",Name="紫黄晶"},
    {Path="data/public/colorgrade/15_PurpleCrystal.png",Name="紫水晶"},
}

function Config:ctor()
end

function Config:dtor()
    --
end

function Config:RefreshSkillList()
    local lLocalPlayer = g_ActorManager:GetLocalPlayer();
    local tbSkillList = {};
    if lLocalPlayer ~= nil then
        local roleType = lLocalPlayer:GetRoleType();
        local schoolIdx = lLocalPlayer:GetSchoolIdx();
        tbSkillList = g_SchoolRoleListCfg:GetSkillList(roleType, schoolIdx);
    end
    return tbSkillList;
end

function Config:GenerateTexture()
    local tbTexture = {}
    local pResourcePool = X3D.GetResourePool()
    for i = 1, #ColorGrade do
        local texture = pResourcePool:RequestTexture(ColorGrade[i].Path, true, true)
        texture = tolua.cast(texture, "IKTexture");
        if not tbTexture[i] then
            tbTexture[i] = {}
        end
        tbTexture[i].texture = texture
        tbTexture[i].name = ColorGrade[i].Name
    end
    return tbTexture
end

ArSettingCfg = Config:new();