Move WeaponProperties to its own file
This commit is contained in:
parent
5c18442131
commit
3bf351782d
|
@ -5,6 +5,7 @@
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "GameFramework/Actor.h"
|
#include "GameFramework/Actor.h"
|
||||||
#include "NakatomiFieldSystemActor.h"
|
#include "NakatomiFieldSystemActor.h"
|
||||||
|
#include "WeaponProperties.h"
|
||||||
#include "Weapon.generated.h"
|
#include "Weapon.generated.h"
|
||||||
|
|
||||||
class ANakatomiCharacter;
|
class ANakatomiCharacter;
|
||||||
|
@ -19,39 +20,6 @@ enum WeaponState
|
||||||
Swapping
|
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)
|
UCLASS(Abstract, Blueprintable)
|
||||||
class NAKATOMI_API AWeapon : public AActor
|
class NAKATOMI_API AWeapon : public AActor
|
||||||
{
|
{
|
||||||
|
|
|
@ -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;
|
||||||
|
};
|
Loading…
Reference in New Issue