2025-01-07 21:21:33 +08:00

32 lines
910 B
Lua

---@class UGCGameMode_C:BP_UGCGameBase_C
---@field NewVar_0 bool
--Edit Below--
---@type UGCGameMode_C
local UGCGameMode = {};
function UGCGameMode:ReceiveBeginPlay()
self.bIsOpenShovelingAbility = DefaultSettings.OpenShovel;
GameMode = self;
self.SuperClass.ReceiveBeginPlay(self);
end
function UGCGameMode:LuaModifyDamage(Damage, DamageType, InstigatorPlayerState, VictimPlayerState)
UGCLogSystem.Log("[UGCGameMode:LuaModifyDamage] 接收到基准伤害:%f", Damage);
local Instigator = nil;
-- 验证有几个玩家
local AllPawns = UGCGameSystem.GetAllPlayerPawn();
local PawnCount = 0;
for i, Pawn in pairs(AllPawns) do
if UE.IsValidPawn(Pawn) then PawnCount = PawnCount + 1; end
end
if PawnCount <= 1 then return 0; end
return Damage;
end
-- function UGCGameMode:ReceiveTick(DeltaTime)
-- end
-- function UGCGameMode:ReceiveEndPlay()
-- end
return UGCGameMode;