32 lines
1.2 KiB
Lua
32 lines
1.2 KiB
Lua
---@class UGCGameMode_C:BP_UGCGameBase_C
|
|
--Edit Below--
|
|
---@type AUGCGameModeBase
|
|
local UGCGameMode = {};
|
|
|
|
function UGCGameMode:ReceiveBeginPlay()
|
|
self.bIsOpenShovelingAbility = DefaultSettings.OpenShovel;
|
|
self.SuperClass.ReceiveBeginPlay(self);
|
|
end
|
|
-- function UGCGameMode:ReceiveTick(DeltaTime) end
|
|
-- function UGCGameMode:ReceiveEndPlay() end
|
|
|
|
function UGCGameMode:LuaModifyDamage(Damage, DamageType, InstigatorPlayerState, VictimPlayerState)
|
|
UGCLogSystem.Log("[UGCGameMode:LuaModifyDamage] 接收到基准伤害:%f", Damage);
|
|
local Instigator = nil;
|
|
if InstigatorPlayerState ~= nil and UE.IsValid(InstigatorPlayerState) then
|
|
Instigator = UGCGameSystem.GetPlayerControllerByPlayerKey(InstigatorPlayerState.PlayerKey);
|
|
end
|
|
return table.func(MiniGameManager, "OnPlayerDamage",
|
|
UGCGameSystem.GetPlayerPawnByPlayerKey(VictimPlayerState.PlayerKey),
|
|
Damage, DamageType, Instigator);
|
|
end
|
|
|
|
---@param PlayerController UGCPlayerController_C
|
|
---@param Target APickUpWrapperActor
|
|
---@param ItemID int32
|
|
---@param Count int32
|
|
function UGCGameMode:UGC_PlayerPickUpEvent(PlayerController, Target, ItemID, Count)
|
|
table.func(MiniGameManager, "OnPlayerPickup", PlayerController, Target, ItemID, Count);
|
|
end
|
|
|
|
return UGCGameMode; |