blaster/Source/Blaster/Pickups/Pickup.h

59 lines
1.2 KiB
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"
2022-05-23 21:45:28 +00:00
#include "Blaster/Character/BlasterCharacter.h"
2022-05-22 15:04:10 +00:00
#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;
2022-05-23 21:45:28 +00:00
2022-05-22 15:04:10 +00:00
protected:
virtual void BeginPlay() override;
UFUNCTION()
virtual void OnSphereOverlap(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult
);
2022-05-23 21:45:28 +00:00
virtual void OnOverlap(ABlasterCharacter* BlasterCharacter);
2022-05-22 20:56:28 +00:00
UPROPERTY(EditAnywhere)
float BaseTurnRate = 45.f;
2022-05-23 21:45:28 +00:00
FTimerHandle BindOverlapTimer;
float BindOverlapTime = 0.25f;
void BindOverlapTimerFinished();
2022-05-22 15:04:10 +00:00
private:
UPROPERTY(EditAnywhere)
class USphereComponent* OverlapSphere;
UPROPERTY(EditAnywhere)
class USoundCue* PickupSound;
UPROPERTY(EditAnywhere)
UStaticMeshComponent* PickupMesh;
2022-05-23 21:45:28 +00:00
2022-05-22 23:06:42 +00:00
UPROPERTY(VisibleAnywhere)
class UNiagaraComponent* PickupEffectComponent;
UPROPERTY(EditAnywhere)
class UNiagaraSystem* PickupEffect;
2022-05-22 15:04:10 +00:00
};