50 lines
1.2 KiB
Lua
50 lines
1.2 KiB
Lua
|
---@class BP_BlockFloor_C:AActor
|
||
|
---@field Plane UStaticMeshComponent
|
||
|
---@field DefaultSceneRoot USceneComponent
|
||
|
--Edit Below--
|
||
|
local BP_BlockFloor = {};
|
||
|
|
||
|
|
||
|
function BP_BlockFloor:ReceiveBeginPlay()
|
||
|
self.SuperClass.ReceiveBeginPlay(self);
|
||
|
if UGCGameSystem.IsServer() then
|
||
|
UGCEventSystem.AddListener(EventEnum.UpdateBlockFloorCollision, self.UpdateBlockFloorCollision , self)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
function BP_BlockFloor:UpdateBlockFloorCollision(IsBlock)
|
||
|
self.Plane:SetCollisionEnabled(IsBlock and ECollisionEnabled.QueryAndPhysics or ECollisionEnabled.NoCollision)
|
||
|
if UGCGameSystem.IsServer() then
|
||
|
UGCSendRPCSystem.ActorRPCNotify(nil, self, "UpdateBlockFloorCollision", IsBlock)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
|
||
|
--[[
|
||
|
function BP_BlockFloor:ReceiveTick(DeltaTime)
|
||
|
self.SuperClass.ReceiveTick(self, DeltaTime);
|
||
|
end
|
||
|
--]]
|
||
|
|
||
|
|
||
|
function BP_BlockFloor:ReceiveEndPlay()
|
||
|
if UGCGameSystem.IsServer() then
|
||
|
UGCEventSystem.RemoveListener(EventEnum.UpdateBlockFloorCollision, self.UpdateBlockFloorCollision , self)
|
||
|
end
|
||
|
self.SuperClass.ReceiveEndPlay(self);
|
||
|
end
|
||
|
|
||
|
|
||
|
--[[
|
||
|
function BP_BlockFloor:GetReplicatedProperties()
|
||
|
return
|
||
|
end
|
||
|
--]]
|
||
|
|
||
|
--[[
|
||
|
function BP_BlockFloor:GetAvailableServerRPCs()
|
||
|
return
|
||
|
end
|
||
|
--]]
|
||
|
|
||
|
return BP_BlockFloor;
|