82 lines
3.1 KiB
Lua
82 lines
3.1 KiB
Lua
-- 类的class
|
|
ObjectPathTable = ObjectPathTable or {
|
|
WB_BroadcastItem_Class = nil;
|
|
W_ShopItemLevelType1_Class = nil;
|
|
W_ShopItemLevelType2_Class = nil;
|
|
W_ShopItem_Class = nil;
|
|
}
|
|
|
|
ObjectPathTable.ObjectEnum = {
|
|
Class = 1,
|
|
Object = 2,
|
|
};
|
|
|
|
-- Object 路径
|
|
ObjectPathTable.ActorPath = {
|
|
[1] = {
|
|
Class = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/Broadcast/WB_BroadcastItem.WB_BroadcastItem_C'),
|
|
Type = ObjectPathTable.ObjectEnum.Class,
|
|
},
|
|
[2] = {
|
|
Class = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/Shop/W_ShopItemLevelType1.W_ShopItemLevelType1_C'),
|
|
Type = ObjectPathTable.ObjectEnum.Class,
|
|
},
|
|
[3] = {
|
|
Class = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/Shop/W_ShopItemLevelType2.W_ShopItemLevelType2_C'),
|
|
Type = ObjectPathTable.ObjectEnum.Class,
|
|
},
|
|
[4] = {
|
|
Class = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/Shop/W_ShopItem.W_ShopItem_C'),
|
|
Type = ObjectPathTable.ObjectEnum.Class,
|
|
},
|
|
[5] = {
|
|
Class = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/StatusUI/FightPanel/NextWeapon/WB_NextWeaponItem.WB_NextWeaponItem_C'),
|
|
Type = ObjectPathTable.ObjectEnum.Class,
|
|
},
|
|
[6] = {
|
|
Class = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/Guide/WB_MechanismInfo.WB_MechanismInfo_C'),
|
|
Type = ObjectPathTable.ObjectEnum.Class,
|
|
},
|
|
[7] = {
|
|
Class = UGCGameSystem.GetUGCResourcesFullPath('Asset/Blueprint/SceneActor/BP_PlayerDeadParticle.BP_PlayerDeadParticle_C'),
|
|
Type = ObjectPathTable.ObjectEnum.Class,
|
|
},
|
|
[8] = {
|
|
Class = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/Guide/WB_SceneItemGuideItem.WB_SceneItemGuideItem_C'),
|
|
Type = ObjectPathTable.ObjectEnum.Class,
|
|
},
|
|
}
|
|
|
|
-- 初始化所有的类型
|
|
function ObjectPathTable.Init()
|
|
ObjectPathTable.WB_BroadcastItem_Class = UE.LoadClass(ObjectPathTable.ActorPath[1].Class);
|
|
ObjectPathTable.W_ShopItemLevelType1_Class = UE.LoadClass(ObjectPathTable.ActorPath[2].Class);
|
|
ObjectPathTable.W_ShopItemLevelType2_Class = UE.LoadClass(ObjectPathTable.ActorPath[3].Class);
|
|
ObjectPathTable.W_ShopItem_Class = UE.LoadClass(ObjectPathTable.ActorPath[4].Class);
|
|
ObjectPathTable.WB_NextWeaponItem_Class = UE.LoadClass(ObjectPathTable.ActorPath[5].Class);
|
|
ObjectPathTable.WB_MechanismInfo_Class = UE.LoadClass(ObjectPathTable.ActorPath[6].Class);
|
|
ObjectPathTable.BP_PlayerDeadParticle_Class = UE.LoadClass(ObjectPathTable.ActorPath[7].Class);
|
|
ObjectPathTable.WB_SceneItemGuideItem_Class = UE.LoadClass(ObjectPathTable.ActorPath[8].Class);
|
|
end
|
|
|
|
---------------------------- PersistentAssets ----------------------------
|
|
ObjectPathTable.PersistentAssets = {} -- { Path = Obj }
|
|
function ObjectPathTable.GetPersistentAssets(Path)
|
|
if not UE.IsValid(ObjectPathTable.PersistentAssets[Path]) then
|
|
local Obj = UE.LoadObject(Path);
|
|
if UE.IsValid(Obj) then
|
|
ObjectPathTable.PersistentAssets[Path] = Obj;
|
|
return Obj;
|
|
end
|
|
end
|
|
|
|
return ObjectPathTable.PersistentAssets[Path];
|
|
end
|
|
|
|
function ObjectPathTable.ClearPersistentAssets()
|
|
ObjectPathTable.PersistentAssets = {};
|
|
end
|
|
|
|
-------------------------- PersistentAssets End --------------------------
|
|
|
|
return ObjectPathTable; |