59 lines
1.8 KiB
Lua
Raw Permalink Normal View History

2025-01-04 23:00:19 +08:00
---@class BP_AttackPointSpawnPoint_C:AActor
---@field ParticleSystem UParticleSystemComponent
---@field DefaultSceneRoot USceneComponent
---@field MapIndex int32
---@field AttackActorActorClass UClass
--Edit Below--
local BP_AttackPointSpawnPoint = {
DoOnceSpawn = false;
}
function BP_AttackPointSpawnPoint:ReceiveBeginPlay()
BP_AttackPointSpawnPoint.SuperClass.ReceiveBeginPlay(self)
if UGCGameSystem.IsServer() then
self:SpawnAttackPoint(UGCGameSystem.GameState:GetMapKey())
UGCEventSystem.AddListener(EventEnum.UpdateMapKey, self.SpawnAttackPoint, self)
end
end
function BP_AttackPointSpawnPoint:SpawnAttackPoint(InMapIndex)
if self.DoOnceSpawn then return end
if InMapIndex == self.MapIndex then
self.DoOnceSpawn = true
UGCLogSystem.Log("[BP_AttackPointSpawnPoint_SpawnAttackPoint] InMapIndex:%s", tostring(InMapIndex))
UGCLogSystem.Log("[BP_AttackPointSpawnPoint_SpawnAttackPoint]Scale3D:%s", VectorHelper.ToString(self:GetActorScale3D()))
local PointActor = UGCGameSystem.SpawnActor(UGCGameSystem.GameState, self.AttackActorActorClass, self:K2_GetActorLocation(), self:K2_GetActorRotation(), self:GetActorScale3D(), nil)
if UE.IsValid(PointActor) then
PointActor:SetActorScale3D(self:GetActorScale3D())
end
end
end
--[[
function BP_AttackPointSpawnPoint:ReceiveTick(DeltaTime)
BP_AttackPointSpawnPoint.SuperClass.ReceiveTick(self, DeltaTime)
end
--]]
--[[
function BP_AttackPointSpawnPoint:ReceiveEndPlay()
BP_AttackPointSpawnPoint.SuperClass.ReceiveEndPlay(self)
end
--]]
--[[
function BP_AttackPointSpawnPoint:GetReplicatedProperties()
return
end
--]]
--[[
function BP_AttackPointSpawnPoint:GetAvailableServerRPCs()
return
end
--]]
return BP_AttackPointSpawnPoint