114 lines
4.6 KiB
Lua
114 lines
4.6 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/Blueprint/Hook/BP_Hook.BP_Hook_C'),
|
||
|
Type = ObjectPathTable.ObjectEnum.Class,
|
||
|
},
|
||
|
[9] = {
|
||
|
Class = UGCGameSystem.GetUGCResourcesFullPath('Asset/Blueprint/SceneKey/WB_TraceTarget.WB_TraceTarget_C'),
|
||
|
Type = ObjectPathTable.ObjectEnum.Class,
|
||
|
},
|
||
|
[10] = {
|
||
|
Class = UGCGameSystem.GetUGCResourcesFullPath('Asset/Blueprint/SceneKey/BP_Key.BP_Key_C'),
|
||
|
Type = ObjectPathTable.ObjectEnum.Class,
|
||
|
},
|
||
|
[11] = {
|
||
|
Class = UGCGameSystem.GetUGCResourcesFullPath('Asset/Blueprint/UGCPlayerPawn.UGCPlayerPawn_C'),
|
||
|
Type = ObjectPathTable.ObjectEnum.Class,
|
||
|
},
|
||
|
[12] = {
|
||
|
Class = UGCGameSystem.GetUGCResourcesFullPath('Asset/Material/Floor/MAT_Test2_2.MAT_Test2_2'),
|
||
|
Type = ObjectPathTable.ObjectEnum.Object,
|
||
|
},
|
||
|
[13] = {
|
||
|
Class = UGCGameSystem.GetUGCResourcesFullPath('Asset/Blueprint/MiniLevelActor/JumpAndCrouch/BP_MakeDamageActor.BP_MakeDamageActor_C'),
|
||
|
Type = ObjectPathTable.ObjectEnum.Class,
|
||
|
},
|
||
|
[14] = {
|
||
|
Class = UGCGameSystem.GetUGCResourcesFullPath('Asset/Blueprint/MiniLevelActor/JumpAndCrouch/BP_JumpAndCrouch_ActorStart.BP_JumpAndCrouch_ActorStart_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.BP_Hook_Class = UE.LoadClass(ObjectPathTable.ActorPath[8].Class);
|
||
|
ObjectPathTable.TraceTargetKey_Class = UE.LoadClass(ObjectPathTable.ActorPath[9].Class);
|
||
|
ObjectPathTable.Key_Class = UE.LoadClass(ObjectPathTable.ActorPath[10].Class);
|
||
|
|
||
|
ObjectPathTable.PlayerPawnClass = UE.LoadClass(ObjectPathTable.ActorPath[11].Class);
|
||
|
ObjectPathTable.BP_MovingActor_Class = UE.LoadClass(ObjectPathTable.ActorPath[13].Class);
|
||
|
ObjectPathTable.BP_ActorStart_Class = UE.LoadClass(ObjectPathTable.ActorPath[14].Class);
|
||
|
|
||
|
ObjectPathTable.Color_Floor_Material_Object = UE.LoadObject(ObjectPathTable.ActorPath[12].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;
|