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.
52 lines
1.2 KiB
52 lines
1.2 KiB
// 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;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere)
|
|
AController* OwningController;
|
|
|
|
protected:
|
|
// Called when the game starts or when spawned
|
|
virtual void BeginPlay() override;
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
|
|
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;
|
|
|
|
};
|