blaster/Source/Blaster/Pickups/Pickup.h

44 lines
836 B
C
Raw Normal View History

2022-05-22 15:04:10 +00:00
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Pickup.generated.h"
UCLASS()
class BLASTER_API APickup : public AActor
{
GENERATED_BODY()
public:
APickup();
virtual void Tick(float DeltaTime) override;
virtual void Destroyed() override;
protected:
virtual void BeginPlay() override;
UFUNCTION()
virtual void OnSphereOverlap(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult
);
private:
UPROPERTY(EditAnywhere)
class USphereComponent* OverlapSphere;
UPROPERTY(EditAnywhere)
class USoundCue* PickupSound;
UPROPERTY(EditAnywhere)
UStaticMeshComponent* PickupMesh;
public:
};