// 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; };