45 lines
1.0 KiB
C++
45 lines
1.0 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "Particles/ParticleSystemComponent.h"
|
|
#include "Projectile.generated.h"
|
|
|
|
UCLASS()
|
|
class BLASTER_API AProjectile : public AActor
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
AProjectile();
|
|
virtual void Tick(float DeltaTime) override;
|
|
|
|
protected:
|
|
virtual void BeginPlay() override;
|
|
|
|
UFUNCTION()
|
|
virtual void OnHit(UPrimitiveComponent* HitComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
|
|
virtual void Destroyed() override;
|
|
|
|
private:
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
class UBoxComponent* CollisionBox;
|
|
|
|
UPROPERTY(VisibleAnywhere)
|
|
class UProjectileMovementComponent* ProjectileMovementComponent;
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
class UParticleSystem* Tracer;
|
|
|
|
class UParticleSystemComponent* TracerComponent;
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
UParticleSystem* ImpactParticles;
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
class USoundCue* ImpactSound;
|
|
};
|