blaster/Source/Blaster/Weapon/Projectile.h

49 lines
1.1 KiB
C
Raw Normal View History

2022-05-04 17:17:25 +00:00
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
2022-05-05 12:15:25 +00:00
#include "Particles/ParticleSystemComponent.h"
2022-05-04 17:17:25 +00:00
#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;
2022-05-05 13:02:47 +00:00
UFUNCTION()
virtual void OnHit(UPrimitiveComponent* HitComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
virtual void Destroyed() override;
2022-05-07 11:03:19 +00:00
UPROPERTY(EditAnywhere)
float Damage = 20.f;
2022-05-05 13:02:47 +00:00
private:
2022-05-04 17:17:25 +00:00
UPROPERTY(EditAnywhere)
class UBoxComponent* CollisionBox;
2022-05-05 10:59:50 +00:00
UPROPERTY(VisibleAnywhere)
class UProjectileMovementComponent* ProjectileMovementComponent;
2022-05-05 12:15:25 +00:00
UPROPERTY(EditAnywhere)
class UParticleSystem* Tracer;
2022-05-09 15:16:41 +00:00
UPROPERTY()
2022-05-05 12:15:25 +00:00
class UParticleSystemComponent* TracerComponent;
2022-05-05 13:02:47 +00:00
UPROPERTY(EditAnywhere)
UParticleSystem* ImpactParticles;
UPROPERTY(EditAnywhere)
class USoundCue* ImpactSound;
2022-05-04 17:17:25 +00:00
};