54 lines
1.6 KiB
C++
Executable file
54 lines
1.6 KiB
C++
Executable file
#pragma once
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/NoExportTypes.h"
|
|
#include "Components/ActorComponent.h"
|
|
#include "GunLogicComponent.generated.h"
|
|
|
|
class UMeshComponent;
|
|
class UParticleSystem;
|
|
class USoundCue;
|
|
class UWeaponFireComponent;
|
|
|
|
UCLASS(Blueprintable, ClassGroup=Custom, meta=(BlueprintSpawnableComponent))
|
|
class UGunLogicComponent : public UActorComponent {
|
|
GENERATED_BODY()
|
|
public:
|
|
protected:
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, Transient, meta=(AllowPrivateAccess=true))
|
|
UWeaponFireComponent* WeaponFire;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, Transient, meta=(AllowPrivateAccess=true))
|
|
UMeshComponent* Mesh;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float RateOfFire;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
UParticleSystem* MuzzleParticles;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
UParticleSystem* TracerParticles;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
USoundCue* FireSound;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float MinTracerDistance;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float TracerSpeed;
|
|
|
|
public:
|
|
UGunLogicComponent();
|
|
UFUNCTION(BlueprintCallable)
|
|
void SetMesh(UMeshComponent* NewMesh);
|
|
|
|
protected:
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnWeaponFireEnded();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnWeaponFired(const FVector& Location);
|
|
|
|
};
|
|
|