LEAP Documentation 40220
Documentation for the LEAP project
AutoPickupVolume.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2022. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Components/ActorComponent.h"
7#include "AutoPickupVolume.generated.h"
8
9class APickup;
10
11DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnPickupVolumeActiveStatusSignature,bool,bActive);
12
13UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
14class PROJECTX_API UAutoPickupVolume : public UActorComponent
15{
16 GENERATED_BODY()
17
18public:
19 // Sets default values for this component's properties
20 UAutoPickupVolume();
21
22 virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
23 virtual void OnRep_IsActive() override;
24
25 UPROPERTY(BlueprintAssignable)
26 FOnPickupVolumeActiveStatusSignature OnActiveStatusUpdatedEvent;
27
28public:
29 /*Radius to trigger the pickup from*/
30 UPROPERTY(EditDefaultsOnly)
31 float AutoPickupRadius = 15000.0f;
32 /* Maximum Height to trigger the pickup*/
33 UPROPERTY(EditDefaultsOnly)
34 float AutoPickupMaximumHeight = 0.0f;
35 /* pickus that are triggered*/
36 UPROPERTY(EditDefaultsOnly)
37 TArray<TSubclassOf<APickup>> PickupClasses;
38};
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnPickupVolumeActiveStatusSignature, bool, bActive)
Definition: Pickup.h:15