First commit

This commit is contained in:
2024-06-02 18:10:57 +02:00
parent 082c70e619
commit b541331d7d
180 changed files with 1552 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Components/SphereComponent.h"
#include "ProjectLighthouseCharacter.h"
#include "TP_PickUpComponent.generated.h"
// Declaration of the delegate that will be called when someone picks this up
// The character picking this up is the parameter sent with the notification
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnPickUp, AProjectLighthouseCharacter*, PickUpCharacter);
UCLASS(Blueprintable, BlueprintType, ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))
class PROJECTLIGHTHOUSE_API UTP_PickUpComponent : public USphereComponent
{
GENERATED_BODY()
public:
/** Delegate to whom anyone can subscribe to receive this event */
UPROPERTY(BlueprintAssignable, Category = "Interaction")
FOnPickUp OnPickUp;
UTP_PickUpComponent();
protected:
/** Called when the game starts */
virtual void BeginPlay() override;
/** Code for when something overlaps this component */
UFUNCTION()
void OnSphereBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
};