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-04 17:17:25 +00:00
UPROPERTY(EditAnywhere)
2022-05-18 17:20:18 +00:00
class UParticleSystem* ImpactParticles;
2022-05-05 10:59:50 +00:00
2022-05-18 17:20:18 +00:00
UPROPERTY(EditAnywhere)
class USoundCue* ImpactSound;
UPROPERTY(EditAnywhere)
class UBoxComponent* CollisionBox;
private:
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-04 17:17:25 +00:00
};