UGCProjects/GZJ/Script/Blueprint/Monster/BP_DelaySpawnActor.lua
2025-01-08 22:46:12 +08:00

49 lines
1.0 KiB
Lua

---@class BP_DelaySpawnActor_C:AActor
---@field DefaultSceneRoot USceneComponent
---@field TargetActor UClass
--Edit Below--
local BP_DelaySpawnActor = {};
function BP_DelaySpawnActor:ReceiveBeginPlay()
self.SuperClass.ReceiveBeginPlay(self);
if UGCGameSystem.IsServer() then
EventSystem.SetTimer(
self,
function ()
UGCGameSystem.SpawnActor(self.TargetActor, self:K2_GetActorLocation(), self:K2_GetActorRotation(), VectorHelper.ScaleOne())
print("BP_DelaySpawnActor_SpawnFinish")
end,
self.DelayTime
)
print("ServerSetSucceed")
end
end
--[[
function BP_DelaySpawnActor:ReceiveTick(DeltaTime)
self.SuperClass.ReceiveTick(self, DeltaTime);
end
--]]
--[[
function BP_DelaySpawnActor:ReceiveEndPlay()
self.SuperClass.ReceiveEndPlay(self);
end
--]]
--[[
function BP_DelaySpawnActor:GetReplicatedProperties()
return
end
--]]
--[[
function BP_DelaySpawnActor:GetAvailableServerRPCs()
return
end
--]]
return BP_DelaySpawnActor;