From 589592927f06364c75acaab1e9c2afb189266ca4 Mon Sep 17 00:00:00 2001 From: baz Date: Thu, 12 Oct 2023 23:03:43 +0100 Subject: [PATCH] Add Decal Actor to Weapons --- Source/Nakatomi/RandomWeaponParameters.h | 3 +++ Source/Nakatomi/Weapon.cpp | 5 +++++ Source/Nakatomi/Weapon.h | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/Source/Nakatomi/RandomWeaponParameters.h b/Source/Nakatomi/RandomWeaponParameters.h index c3221dd..353acf2 100644 --- a/Source/Nakatomi/RandomWeaponParameters.h +++ b/Source/Nakatomi/RandomWeaponParameters.h @@ -101,6 +101,9 @@ public: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Random Weapon Parameters|Field System Actor") TArray> FieldSystemActor; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Random Weapon Parameters|Decal Actor") + TArray> DecalActor; + FWeaponProperties GenerateRandomWeaponProperties(); USkeletalMesh* PickRandomMesh(); diff --git a/Source/Nakatomi/Weapon.cpp b/Source/Nakatomi/Weapon.cpp index 9afcbdf..377f647 100644 --- a/Source/Nakatomi/Weapon.cpp +++ b/Source/Nakatomi/Weapon.cpp @@ -120,6 +120,11 @@ TSubclassOf AWeapon::GetWeaponThrowableTemplate() return WeaponThrowableTemplate; } +TSubclassOf AWeapon::GetDecalActor() +{ + return DecalActor; +} + TSubclassOf AWeapon::GetFieldSystemActor() { return FieldSystemActor; diff --git a/Source/Nakatomi/Weapon.h b/Source/Nakatomi/Weapon.h index 3007081..d1901f1 100644 --- a/Source/Nakatomi/Weapon.h +++ b/Source/Nakatomi/Weapon.h @@ -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 WeaponThrowableTemplate; + UPROPERTY(EditDefaultsOnly) + TSubclassOf DecalActor; + public: // Sets default values for this actor's properties AWeapon(); @@ -95,4 +99,6 @@ public: TSubclassOf GetFieldSystemActor(); TSubclassOf GetWeaponThrowableTemplate(); + + TSubclassOf GetDecalActor(); };