LEAP Documentation 40220
Documentation for the LEAP project
GroundEffectVolume.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2018. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "GameFramework/Actor.h"
7#include "TeamInterface.h"
8#include "GroundEffectVolume.generated.h"
9
10class UAfflictionVolume;
11
12DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FGroundEffectTeamChangedSignature, int32, NewTeam);
13
14UCLASS()
15class PROJECTX_API AGroundEffectVolume : public AActor, public ITeamInterface
16{
17 GENERATED_UCLASS_BODY()
18
19public:
20 //Gets the team this boundary is set to
21 virtual int32 GetTeam() const override { return TeamOwner; }
22 //Sets the new team for this soft boundary
23 virtual int32 SetTeam(int32 NewTeam) override;
24 UFUNCTION(BlueprintCallable)
25 void SpawnGroundEffects(float AreaRadius, float NumberOfPoints);
26 UFUNCTION(BlueprintImplementableEvent)
27 void SpawnGroundEffectAtPosition(const FVector& Position);
28
29 UPROPERTY(BlueprintAssignable)
30 FGroundEffectTeamChangedSignature OnTeamChangedEvent;
31
32protected:
33 // Called when the game starts or when spawned
34 virtual void BeginPlay() override;
35 UFUNCTION()
36 void OnRep_TeamOwner();
37protected:
38 //The base Affliction Overlap Component used by this volume
39 UPROPERTY(EditAnywhere, Category = "Ground Effect", meta = (AllowPrivateAccess = true))
40 UAfflictionVolume* AfflictionVolume = nullptr;
41 //The starting team owner of this volume, this can be changed dynammicaly through UAfflictionOverlapComponent::SetTeam;
42 UPROPERTY(EditAnywhere, ReplicatedUsing = OnRep_TeamOwner, Category = "Soft Boundary", meta = (AllowPrivateAccess = true))
43 int32 TeamOwner = INDEX_NONE;
44 //The Radius of the area to spawn the ground effects
45 UPROPERTY(EditAnywhere, Category = "Ground Effect", meta = (AllowPrivateAccess = true))
46 float GroundEffectSpawnRadius = 100.0f;
47 //The Number of Effects To Spawn
48 UPROPERTY(EditAnywhere, Category = "Ground Effect", meta = (AllowPrivateAccess = true))
49 float NumberOfGroundEffects = 100.0f;
50 //Control density of effects
51 UPROPERTY(EditAnywhere, Category = "Ground Effect", meta = (AllowPrivateAccess = true))
52 float Alpha = 1.0f;
53 //How Hight to Start for checking the ground
54 UPROPERTY(EditAnywhere, Category = "Ground Effect", meta = (AllowPrivateAccess = true))
55 float TestHeight = 1000.0f;
56};
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FGroundEffectTeamChangedSignature, int32, NewTeam)
Definition: GroundEffectVolume.h:16
virtual int32 GetTeam() const override
Definition: GroundEffectVolume.h:21
Definition: TeamInterface.h:26