OutSidePictureMgr = OutSidePictureMgr or BaseClass()
|
|
local OutSidePictureMgr = OutSidePictureMgr
|
|
--type 1.加载png 2.加载jpg
|
|
OutSidePictureMgr.PreLoad =
|
|
{
|
|
FirstRechargeView_BG = {type = 1,name = "FirstRechargeView_BG",modele = "rechargeActivity",res = "scui_bg"},
|
|
ReChargePreView_BG = {type = 1,name = "ReChargePreView_BG",modele = "guide",res = "uisccz_bg"},
|
|
--Re_BG = {type = 2,name = "Re_BG",modele = "",res = "zcui_zsdz_bg"},
|
|
MarriagePhotoWall = {type = 2,name = "MarriagePhotoWall",modele = "",res = "jyui_xk"},
|
|
MarriageTitle1 = {type = 1,name = "MarriageTitle1",modele = "marriage",res = "jyui_ggy1"},
|
|
MarriageTitle2 = {type = 1,name = "MarriageTitle2",modele = "marriage",res = "jyui_ggy2"},
|
|
MarriageBg = {type = 1,name = "MarriageBg",modele = "marriage",res = "jyui_bg"},
|
|
}
|
|
|
|
function OutSidePictureMgr:__init()
|
|
OutSidePictureMgr.Instance = self
|
|
self.load_pic_list = nil
|
|
self.is_loaded = false
|
|
|
|
end
|
|
|
|
function OutSidePictureMgr:getInstance()
|
|
if OutSidePictureMgr.Instance == nil then
|
|
OutSidePictureMgr.New();
|
|
end
|
|
return OutSidePictureMgr.Instance;
|
|
end
|
|
|
|
function OutSidePictureMgr:PreLoadOutSidePicture()
|
|
if self.is_loaded then
|
|
return
|
|
end
|
|
|
|
self.is_loaded = true
|
|
|
|
--self.load_pic_list = {}
|
|
|
|
local modele,res,respath
|
|
|
|
for key,data in pairs(OutSidePictureMgr.PreLoad) do
|
|
modele = data.modele
|
|
res = data.res
|
|
if data.type == 1 then
|
|
respath = GameResPath.GetImage(modele,res)
|
|
else
|
|
respath = GameResPath.GetJpgImage(res..".jpg")
|
|
end
|
|
|
|
local abName, res_name = GameResPath.GetOutSideResAbName(respath)
|
|
resMgr:LoadSprites(abName, {res_name}, function ()
|
|
end, ASSETS_LEVEL.NORMAL)
|
|
end
|
|
end
|
|
|
|
function OutSidePictureMgr:GetOutSidePictureSprite(key)
|
|
if not self.load_pic_list then
|
|
return false
|
|
end
|
|
return self.load_pic_list[key]
|
|
end
|
|
|
|
function OutSidePictureMgr:UnLoadPictureSprite()
|
|
if not self.load_pic_list then
|
|
return
|
|
end
|
|
|
|
lua_resM:clearRefCount(self)
|
|
self.load_pic_list = nil
|
|
|
|
self.is_loaded = false
|
|
end
|
|
|
|
|