61 lines
1.6 KiB
Lua
61 lines
1.6 KiB
Lua
---@class UGCPlayerState_C:BP_UGCPlayerState_C
|
|
--Edit Below--
|
|
---@type UGCPlayerState_C
|
|
local UGCPlayerState = {};
|
|
UGCPlayerState.WeaponInfiniteType = 0;
|
|
|
|
function UGCPlayerState:ReceiveBeginPlay()
|
|
self.OnCurrentPlayerKillNumChangedDelegate:Add(self.OnKillNumChange, self);
|
|
end
|
|
|
|
function UGCPlayerState:OnKillNumChange(KillCount,bIsAI)
|
|
if IsServer then
|
|
|
|
end
|
|
end
|
|
|
|
--- 操作是一旦使用了换装备的按钮,就会调用该函数,之后玩家添加的时候就会使用该配置
|
|
---@param InWeapon ASTExtraWeapon
|
|
function UGCPlayerState:UpdateWeaponAttachment(Pawn, InWeapon)
|
|
-- 获取玩家的缓存
|
|
UGCLogSystem.Log("[UGCPlayerState:UpdateWeaponAttachment] 执行")
|
|
local ArchiveData = ArchiveTable[self.PlayerKey];
|
|
if ArchiveData.Weapons == nil then ArchiveData.Weapons = {}; end
|
|
local ItemId = InWeapon:GetWeaponItemID();
|
|
local Weapon = UGCWeaponManagerSystem.GetCurrentWeapon(Pawn);
|
|
local Parts = ItemTool.GetWeaponParts(Weapon);
|
|
ArchiveData.Weapons[ItemId] = Parts;
|
|
end
|
|
|
|
--function UGCPlayerState:GetReplicatedProperties()
|
|
-- return ;
|
|
--end
|
|
|
|
---@param InType EFillBulletType
|
|
function UGCPlayerState:SetInfiniteType(InType)
|
|
self.WeaponInfiniteType = InType;
|
|
DOREPONCE(self, "WeaponInfiniteType");
|
|
end
|
|
|
|
function UGCPlayerState:GetInfiniteType() return self.WeaponInfiniteType; end
|
|
|
|
--- 重置击杀数
|
|
function UGCPlayerState:ResetKillNum()
|
|
-- 重置击杀数
|
|
self.Kills = 0;
|
|
self.KillPlayerNum = 0;
|
|
DOREPONCE(self, "Kills")
|
|
DOREPONCE(self, "KillPlayerNum")
|
|
end
|
|
|
|
function UGCPlayerState:ResetGame()
|
|
self:ResetKillNum();
|
|
end
|
|
|
|
--[[
|
|
function UGCPlayerState:GetAvailableServerRPCs()
|
|
return
|
|
end
|
|
--]]
|
|
|
|
return UGCPlayerState; |