82 lines
1.8 KiB
Lua
82 lines
1.8 KiB
Lua
---@class BP_Balloon_C:AActor
|
|
---@field BoomParticle UParticleSystemComponent
|
|
---@field BalloonMesh UStaticMeshComponent
|
|
---@field DefaultSceneRoot USceneComponent
|
|
--Edit Below--
|
|
local BP_Balloon = {
|
|
bIsActive = true;
|
|
};
|
|
|
|
|
|
--function BP_Balloon:ReceiveBeginPlay()
|
|
-- self.SuperClass.ReceiveBeginPlay(self);
|
|
--end
|
|
|
|
|
|
--[[
|
|
function BP_Balloon:ReceiveTick(DeltaTime)
|
|
self.SuperClass.ReceiveTick(self, DeltaTime);
|
|
end
|
|
--]]
|
|
|
|
--[[
|
|
function BP_Balloon:ReceiveEndPlay()
|
|
self.SuperClass.ReceiveEndPlay(self);
|
|
end
|
|
--]]
|
|
|
|
--[[
|
|
function BP_Balloon:GetReplicatedProperties()
|
|
return
|
|
end
|
|
--]]
|
|
|
|
--[[
|
|
function BP_Balloon:GetAvailableServerRPCs()
|
|
return
|
|
end
|
|
--]]
|
|
|
|
function BP_Balloon:SetOwnerPlayer(PlayerKey)
|
|
UGCLogSystem.Log("[BP_Balloon_SetOwnerPlayer]")
|
|
self.OwnerPlayerKey = PlayerKey
|
|
end
|
|
|
|
function BP_Balloon:GetOwnerPlayerKey()
|
|
return self.OwnerPlayerKey
|
|
end
|
|
|
|
function BP_Balloon:GetBalloonIsActive()
|
|
return self.bIsActive
|
|
end
|
|
|
|
-- Server
|
|
function BP_Balloon:Pierce()
|
|
UGCLogSystem.Log("[BP_Balloon_Pierce]")
|
|
if UGCGameSystem.IsServer() and self.bIsActive then
|
|
self.bIsActive = false
|
|
UGCSendRPCSystem.ActorRPCNotify(nil, self, "SetPierceEffect", true)
|
|
end
|
|
end
|
|
|
|
|
|
-- Server
|
|
function BP_Balloon:ResetBalloon()
|
|
UGCLogSystem.Log("[BP_Balloon_ResetBalloon]")
|
|
if UGCGameSystem.IsServer() and not self.bIsActive then
|
|
self.bIsActive = true
|
|
UGCSendRPCSystem.ActorRPCNotify(nil, self, "SetPierceEffect", false)
|
|
end
|
|
end
|
|
|
|
function BP_Balloon:SetPierceEffect(IsPierce)
|
|
UGCLogSystem.Log("[BP_Balloon_SetPierceEffect]")
|
|
self.BalloonMesh:SetHiddenInGame(IsPierce)
|
|
self.Cable:SetHiddenInGame(IsPierce)
|
|
if IsPierce then
|
|
self.BoomParticle:SetActive(true, true)
|
|
SoundSystem.PlaySound(SoundSystem.ESound.Impact)
|
|
end
|
|
end
|
|
|
|
return BP_Balloon; |