41 lines
961 B
C++
41 lines
961 B
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "LMWeaponDataStructure.h"
|
|
#include "LMWeapon.generated.h"
|
|
|
|
struct FLMWeaponDataStructure;
|
|
|
|
UCLASS(BlueprintType, Blueprintable)
|
|
class LEGUMEMIX_API ULMWeapon : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
|
|
UPROPERTY()
|
|
FLMWeaponDataStructure WeaponDataStructure;
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Legumix")
|
|
FDataTableRowHandle WeaponRow;
|
|
|
|
UPROPERTY()
|
|
int CurrentClipAmmo;
|
|
|
|
UPROPERTY()
|
|
int CurrentAmmoInInventory;
|
|
|
|
void Initialize();
|
|
|
|
void Fire();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void Reload(); //Reload current clip to max ammo in clip
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnReload(); //To call in blueprint for design utilities
|
|
|
|
void AddAmmo(int AmountOfAmmoToGet); //Add ammo in inventory
|
|
|
|
bool HasAmmoInClip(); //Check if there is ammo in clip (return a bool)
|
|
bool HasAmmoInInventory(); //Check if there is ammo in "inventory" (return a bool)
|
|
};
|