Move WeaponProperties to its own file

This commit is contained in:
Louis Hobbs 2023-02-08 02:36:38 +00:00
parent 5c18442131
commit 3bf351782d
2 changed files with 44 additions and 33 deletions

View File

@ -5,6 +5,7 @@
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "NakatomiFieldSystemActor.h"
#include "WeaponProperties.h"
#include "Weapon.generated.h"
class ANakatomiCharacter;
@ -19,39 +20,6 @@ enum WeaponState
Swapping
};
USTRUCT(BlueprintType)
struct FWeaponProperties
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
float WeaponCooldown = 1.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
float WeaponDamage = 10;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
float WeaponChangeTime = 2.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
int MaxAmmo = 1;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
int DefaultAmmo = 1;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
int ProjectilesPerShot = 1;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
float ProjectileRange = 10000.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
float WeaponSpread = 2.5f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
bool IsAutomatic = true;
};
UCLASS(Abstract, Blueprintable)
class NAKATOMI_API AWeapon : public AActor
{

View File

@ -0,0 +1,43 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "WeaponProperties.generated.h"
/**
*
*/
USTRUCT(BlueprintType)
struct FWeaponProperties
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
float WeaponCooldown = 1.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
float WeaponDamage = 10;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
float WeaponChangeTime = 2.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
int MaxAmmo = 1;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
int DefaultAmmo = 1;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
int ProjectilesPerShot = 1;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
float ProjectileRange = 10000.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
float WeaponSpread = 2.5f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
bool IsAutomatic = true;
};