This repository has been archived on 2025-04-18. You can view files and clone it, but cannot push or open issues or pull requests.

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)
};