Add Decal Actor to Weapons

This commit is contained in:
baz 2023-10-12 23:03:43 +01:00
parent 12c8d7b6f0
commit 589592927f
3 changed files with 14 additions and 0 deletions

View File

@ -101,6 +101,9 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Random Weapon Parameters|Field System Actor")
TArray<TSubclassOf<class ANakatomiFieldSystemActor>> FieldSystemActor;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Random Weapon Parameters|Decal Actor")
TArray<TSubclassOf<class ADecalActor>> DecalActor;
FWeaponProperties GenerateRandomWeaponProperties();
USkeletalMesh* PickRandomMesh();

View File

@ -120,6 +120,11 @@ TSubclassOf<AWeaponThrowable> AWeapon::GetWeaponThrowableTemplate()
return WeaponThrowableTemplate;
}
TSubclassOf<ADecalActor> AWeapon::GetDecalActor()
{
return DecalActor;
}
TSubclassOf<class ANakatomiFieldSystemActor> AWeapon::GetFieldSystemActor()
{
return FieldSystemActor;

View File

@ -3,6 +3,7 @@
#pragma once
#include "CoreMinimal.h"
#include "Engine/DecalActor.h"
#include "GameFramework/Actor.h"
#include "NakatomiFieldSystemActor.h"
#include "WeaponProperties.h"
@ -51,6 +52,9 @@ protected:
UPROPERTY(EditDefaultsOnly)
TSubclassOf<class AWeaponThrowable> WeaponThrowableTemplate;
UPROPERTY(EditDefaultsOnly)
TSubclassOf<class ADecalActor> DecalActor;
public:
// Sets default values for this actor's properties
AWeapon();
@ -95,4 +99,6 @@ public:
TSubclassOf<class ANakatomiFieldSystemActor> GetFieldSystemActor();
TSubclassOf<AWeaponThrowable> GetWeaponThrowableTemplate();
TSubclassOf<class ADecalActor> GetDecalActor();
};