2022-05-19 17:13:21 +00:00
|
|
|
// 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;
|
2022-05-26 12:03:51 +00:00
|
|
|
|
2022-05-20 10:10:21 +00:00
|
|
|
protected:
|
2022-05-20 10:59:55 +00:00
|
|
|
void WeaponTraceHit(const FVector& TraceStart, const FVector& HitTarget, FHitResult& OutHit);
|
2022-05-20 10:10:21 +00:00
|
|
|
|
2022-05-19 17:13:21 +00:00
|
|
|
UPROPERTY(EditAnywhere)
|
2022-05-19 17:35:20 +00:00
|
|
|
UParticleSystem* ImpactParticles;
|
2022-05-20 10:59:55 +00:00
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
|
|
USoundCue* HitSound;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
|
|
float Damage = 20.f;
|
|
|
|
|
|
|
|
private:
|
2022-05-19 17:35:20 +00:00
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
|
|
UParticleSystem* BeamParticles;
|
|
|
|
|
2022-05-19 18:51:50 +00:00
|
|
|
UPROPERTY(EditAnywhere)
|
|
|
|
UParticleSystem* MuzzleFlash;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
|
|
USoundCue* FireSound;
|
|
|
|
|
2022-05-20 10:10:21 +00:00
|
|
|
};
|