【SpriteLoader】修改初始化位置,兼容老包
parent
e0b0140609
commit
9cce82f017
|
@ -66,6 +66,4 @@ AppConst.UmengChannleId = "App Store"
|
|||
AppConst.Bugly_IosAppId = "c07e578650"
|
||||
AppConst.Bugly_AndroidAppId = "9b909facba"
|
||||
|
||||
AppConst.LaQi_JoinRoom_Url = "com.doudou.dwc://data/openwith?"
|
||||
|
||||
SpriteLoader = require("Modules.Common.SpriteLoader")
|
||||
AppConst.LaQi_JoinRoom_Url = "com.doudou.dwc://data/openwith?"
|
|
@ -12,6 +12,7 @@ ServerConfigManager.SettingConfig = {
|
|||
IS_SHOW_HEALTH_TIP = "IS_SHOW_HEALTH_TIP", -- 是否显示健康提示
|
||||
NOTICE_CHANNEL = "NOTICE_CHANNEL", -- 公告号
|
||||
PACKAGE_CC_CODE = "PACKAGE_CC_CODE", -- CC号
|
||||
SPRITE_LOADER = "SPRITE_LOADER", -- 资源加载器是否可以使用
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
local SpriteLoaderPool = {}
|
||||
local SpriteLoader = {}
|
||||
local spLoaderIndex = 0
|
||||
local IsActive = ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.SPRITE_LOADER)
|
||||
|
||||
-- 调用此方法创建一个管理器
|
||||
function SpriteLoader.New()
|
||||
|
@ -19,6 +20,9 @@ function SpriteLoader.New()
|
|||
end
|
||||
|
||||
function SpriteLoader:LoadSprite(name)
|
||||
if not IsActive then
|
||||
return Util.LoadSprite(name)
|
||||
end
|
||||
local transName = GetTranslateSpriteName(name)
|
||||
local sp = resMgr:LoadSpriteAsset(transName)
|
||||
if sp then
|
||||
|
@ -54,6 +58,9 @@ end
|
|||
|
||||
-- 销毁loader
|
||||
function SpriteLoader:Destroy()
|
||||
if not IsActive then
|
||||
return
|
||||
end
|
||||
coroutine.start(function()
|
||||
coroutine.wait(2)
|
||||
self:UnLoadSprite()
|
||||
|
|
|
@ -22,3 +22,5 @@ U3d=UnityEngine
|
|||
WWW = UnityEngine.WWW;
|
||||
GameEventHandler=GameLogic.GameEventHandler
|
||||
UpdateManager=GameLogic.UpdateManager
|
||||
|
||||
SpriteLoader = require("Modules.Common.SpriteLoader")
|
Loading…
Reference in New Issue