blaster/Source/Blaster/Weapon/HitScanWeapon.h

43 lines
783 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Weapon.h"
#include "HitScanWeapon.generated.h"
/**
*
*/
UCLASS()
class BLASTER_API AHitScanWeapon : public AWeapon
{
GENERATED_BODY()
public:
virtual void Fire(const FVector& HitTarget) override;
protected:
void WeaponTraceHit(const FVector& TraceStart, const FVector& HitTarget, FHitResult& OutHit);
UPROPERTY(EditAnywhere)
UParticleSystem* ImpactParticles;
UPROPERTY(EditAnywhere)
USoundCue* HitSound;
UPROPERTY(EditAnywhere)
float Damage = 20.f;
private:
UPROPERTY(EditAnywhere)
UParticleSystem* BeamParticles;
UPROPERTY(EditAnywhere)
UParticleSystem* MuzzleFlash;
UPROPERTY(EditAnywhere)
USoundCue* FireSound;
};