---@class UGCGameMode_C:BP_UGCGameBase_C --Edit Below-- local UGCGameMode = {}; -- 射击枪械槽类型 ShootWeaponEnums = { ESurviveWeaponPropSlot.SWPS_MainShootWeapon1, ESurviveWeaponPropSlot.SWPS_MainShootWeapon2, ESurviveWeaponPropSlot.SWPS_SubShootWeapon, }; function UGCGameMode:ReceiveBeginPlay() UGCEventSystem.SetTimerLoop(UGCGameSystem.GameState, function() local AllPlayerPawn = UGCGameSystem.GetAllPlayerPawn() for i, PlayerPawn in pairs(AllPlayerPawn) do for k, ShootWeaponEnum in pairs(ShootWeaponEnums) do local Weapon = UGCWeaponManagerSystem.GetWeaponBySlot(PlayerPawn, ShootWeaponEnum) if UE.IsValid(Weapon) then UGCGunSystem.EnableClipInfiniteBullets(Weapon, true) end end end end, 0.5 ) end -- function UGCGameMode:ReceiveTick(DeltaTime) -- end -- function UGCGameMode:ReceiveEndPlay() -- end return UGCGameMode;