Add `NakatomiFieldSystemActor` to `Weapon`

This commit is contained in:
Louis Hobbs 2023-01-31 21:26:45 +00:00
parent 934055d0ed
commit 97c937d212
2 changed files with 12 additions and 0 deletions

View File

@ -116,3 +116,8 @@ void AWeapon::DecrementAmmoCount(int ammoCount)
AmmoCount = 0; AmmoCount = 0;
} }
} }
TSubclassOf<class ANakatomiFieldSystemActor> AWeapon::GetFieldSystemActor()
{
return FieldSystemActor;
}

View File

@ -4,9 +4,11 @@
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "GameFramework/Actor.h" #include "GameFramework/Actor.h"
#include "NakatomiFieldSystemActor.h"
#include "Weapon.generated.h" #include "Weapon.generated.h"
class ANakatomiCharacter; class ANakatomiCharacter;
class ANakatomiFieldSystemActor;
UENUM() UENUM()
enum WeaponState enum WeaponState
@ -75,6 +77,9 @@ protected:
UPROPERTY(VisibleAnywhere) UPROPERTY(VisibleAnywhere)
int AmmoCount; int AmmoCount;
UPROPERTY(EditDefaultsOnly)
TSubclassOf<class ANakatomiFieldSystemActor> FieldSystemActor;
public: public:
// Sets default values for this actor's properties // Sets default values for this actor's properties
AWeapon(); AWeapon();
@ -115,4 +120,6 @@ public:
void IncrementAmmoCount(int ammoCount); void IncrementAmmoCount(int ammoCount);
void DecrementAmmoCount(int ammoCount); void DecrementAmmoCount(int ammoCount);
TSubclassOf<class ANakatomiFieldSystemActor> GetFieldSystemActor();
}; };