You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.1 KiB

9 months ago
// Copyright Zelle Games
#pragma once
#include "CoreMinimal.h"
#include "Components/SphereComponent.h"
#include "GameFramework/Actor.h"
#include "GameFramework/ProjectileMovementComponent.h"
#include "BasicProjectile.generated.h"
UCLASS()
class STREETPUNKZ_API ABasicProjectile : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ABasicProjectile();
UPROPERTY(BlueprintReadWrite)
float Damage;
UPROPERTY(BlueprintReadWrite, EditAnywhere)
UMeshComponent* MeshComponent;
UPROPERTY(BlueprintReadWrite, EditAnywhere)
USphereComponent* SphereComponent;
UPROPERTY(BlueprintReadWrite, EditAnywhere)
UProjectileMovementComponent* ProjectileMovementComponent;
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
UFUNCTION()
void OnSphereOverlap(UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};