-------------------------------------------------------
-- 资源管理
-- Copyright (c) 2014 李丁
-------------------------------------------------------

-- 纹理资源
local publicTextureRes = { 
                                
                         }        -- 公共纹理资源

                           
-- -- 声音资源
 LzDaer_publicaudioRes = { music = { 
                                game_bg = "LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/ydrbgmusic.mp3",
    
                     }, -- 背景音乐
             sound = {
                xipai= "LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/xipai.mp3", 
                fapai= "LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/fapai.wav", 
                guopai= "LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/guopai.mp3",  
                qipai= "LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/qipai.mp3",  
                ["boy"] = {
                           poker_1="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/x1.mp3",    
                           poker_2="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/x2.mp3",    
                           poker_3="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/x3.mp3",    
                           poker_4="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/x4.mp3",    
                           poker_5="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/x5.mp3",    
                           poker_6="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/x6.mp3",    
                           poker_7="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/x7.mp3",    
                           poker_8="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/x8.mp3",    
                           poker_9="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/x9.mp3",    
                           poker_10="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/x10.mp3",    
                           poker_11="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/d1.mp3",    
                           poker_12="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/d2.mp3",    
                           poker_13="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/d3.mp3",    
                           poker_14="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/d4.mp3",    
                           poker_15="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/d5.mp3",    
                           poker_16="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/d6.mp3",    
                           poker_17="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/d7.mp3",    
                           poker_18="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/d8.mp3",    
                           poker_19="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/d9.mp3",    
                           poker_20="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/d10.mp3",  

                           poker_baile="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/baile.mp3",    
                           poker_baole="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/baole.mp3",    
                           poker_chi="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/chi.mp3",    
                           poker_haidi="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/haidi.mp3", 
                           poker_hu="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/hu.mp3",    
                           poker_long="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/long.mp3",      
                           poker_peng="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/peng.mp3",    
                           poker_shuishangpiao="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/shuishangpiao.mp3",    
                           poker_tianhu="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/tianhu.mp3",    
                           poker_zhao="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/zhao.mp3",    
                           poker_zimo="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/boy/zimo.mp3",    
                        },      
            ["girl"] = {
                       poker_1="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/x1.mp3",    
                       poker_2="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/x2.mp3",    
                       poker_3="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/x3.mp3",    
                       poker_4="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/x4.mp3",    
                       poker_5="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/x5.mp3",    
                       poker_6="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/x6.mp3",    
                       poker_7="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/x7.mp3",    
                       poker_8="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/x8.mp3",    
                       poker_9="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/x9.mp3",    
                       poker_10="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/x10.mp3",    
                       poker_11="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/d1.mp3",    
                       poker_12="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/d2.mp3",    
                       poker_13="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/d3.mp3",    
                       poker_14="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/d4.mp3",    
                       poker_15="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/d5.mp3",    
                       poker_16="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/d6.mp3",    
                       poker_17="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/d7.mp3",    
                       poker_18="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/d8.mp3",    
                       poker_19="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/d9.mp3",    
                       poker_20="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/d10.mp3",  

                       poker_baile="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/baile.mp3",    
                       poker_baole="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/baole.mp3",    
                       poker_chi="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/chi.mp3",    
                       poker_haidi="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/haidi.mp3", 
                       poker_hu="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/hu.mp3",    
                       poker_long="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/long.mp3",      
                       poker_peng="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/peng.mp3",    
                       poker_shuishangpiao="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/shuishangpiao.mp3",    
                       poker_tianhu="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/tianhu.mp3",    
                       poker_zhao="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/zhao.mp3",    
                       poker_zimo="LzDaer/LzDaer_Res/LzDaer_PublicRes/AudioRes/girl/zimo.mp3", 
               }, 
            }, -- 音效


}

local ui = 
{
    'FlowerOptionUI'
}

-- 加载游戏资源
function LzDaer_loadPublicRes( )
    CCLOG("加载LzDaer公共资源")
    -- 纹理加载
    sys.ResLoader( publicTextureRes )
    -- 音效加载
    sys.SoundEffectLoader( LzDaer_publicaudioRes.sound )
    -- sys.SoundEffectLoader( LzDaer_publicaudioRes["boy"] )
    --sys.SoundEffectLoader( LzDaer_publicaudioRes["girl"] )
    -- 加载背景音乐
    if UIReg and type(UIReg) == 'table' then
        UIReg[ui[1]] = {['ui'] = 'LzDaer/LzDaer_Res/LzDaer_MobileRes/PicRes/FlowerOptionUI.ExportJson',['lua'] = 'LzDaer/LzDaer_Public/LzDaer_Public_Scripts/LzDaer_OptionUI'}
    end
    sys.BgMusicLoader(LzDaer_publicaudioRes.music)
end
-- 卸载游戏资源
function LzDaer_unloadPublicRes( )
    CCLOG("卸载LzDaer公共资源")
    -- 纹理卸载
    sys.ResUnLoader( publicTextureRes )
    -- 音乐音效卸载
    sys.SoundEffectUnLoader( LzDaer_publicaudioRes.sound )
    --sys.SoundEffectUnLoader( LzDaer_publicaudioRes["boy"]  )
    --sys.SoundEffectUnLoader( LzDaer_publicaudioRes["girl"] )
   if UIReg and type(UIReg) == 'table' then
        for i = 1, #ui do
            UIReg[ui[i]] = nil
        end
    end
    sys.stopMusic(  )
end
