Added weapons radivolver and bazoucorn
added bp radivolver and bazoucorn added dt weapon data
This commit is contained in:
parent
f39f90b411
commit
6da5f75089
BIN
Binaries/Win64/UnrealEditor-LegumeMix.exp
(Stored with Git LFS)
BIN
Binaries/Win64/UnrealEditor-LegumeMix.exp
(Stored with Git LFS)
Binary file not shown.
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:857367d1cbd5cf6e376a48fdc7e5322bcb5ac0fb89152955790a09ce2bae9bb9
|
oid sha256:c9a69dc83569b529cbab9a41a0b4a673d1954c0706a7d4fa86941384f9f7ec04
|
||||||
size 60223488
|
size 60411904
|
||||||
|
BIN
Content/Legumix/Weapon/BP_Bazoucorn.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Weapon/BP_Bazoucorn.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Weapon/BP_Radivolver.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Weapon/BP_Radivolver.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Weapon/DT_WeaponData.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Weapon/DT_WeaponData.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
4
Source/LegumeMix/Private/Weapon/Bazoucorn.cpp
Normal file
4
Source/LegumeMix/Private/Weapon/Bazoucorn.cpp
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "Weapon/Bazoucorn.h"
|
4
Source/LegumeMix/Private/Weapon/LMRadivolver.cpp
Normal file
4
Source/LegumeMix/Private/Weapon/LMRadivolver.cpp
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "Weapon/LMRadivolver.h"
|
@ -1 +1,33 @@
|
|||||||
#include "Weapon/LMWeapon.h"
|
#include "Weapon/LMWeapon.h"
|
||||||
|
|
||||||
|
#include "Weapon/LMWeaponDataStructure.h"
|
||||||
|
|
||||||
|
void ULMWeapon::Initialize()
|
||||||
|
{
|
||||||
|
WeaponDataStructure =* WeaponRow.GetRow<FLMWeaponDataStructure>(TEXT(""));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ULMWeapon::HasAmmoInClip()
|
||||||
|
{
|
||||||
|
if(CurrentClipAmmo > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ULMWeapon::HasAmmoInInventory()
|
||||||
|
{
|
||||||
|
if (CurrentAmmoInInventory > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ULMWeapon::Reload()
|
||||||
|
{
|
||||||
|
//Do design reload logic
|
||||||
|
OnReload();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
#include "Weapon/LMWeaponDataStructure.h"
|
16
Source/LegumeMix/Public/Weapon/Bazoucorn.h
Normal file
16
Source/LegumeMix/Public/Weapon/Bazoucorn.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "LMWeapon.h"
|
||||||
|
#include "Bazoucorn.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS(BlueprintType, Blueprintable)
|
||||||
|
class LEGUMEMIX_API UBazoucorn : public ULMWeapon
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
};
|
16
Source/LegumeMix/Public/Weapon/LMRadivolver.h
Normal file
16
Source/LegumeMix/Public/Weapon/LMRadivolver.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "LMWeapon.h"
|
||||||
|
#include "LMRadivolver.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS(BlueprintType, Blueprintable)
|
||||||
|
class LEGUMEMIX_API ULMRadivolver : public ULMWeapon
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
};
|
@ -1,9 +1,38 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
|
#include "LMWeaponDataStructure.h"
|
||||||
|
#include "LMWeapon.generated.h"
|
||||||
|
|
||||||
UCLASS()
|
struct FLMWeaponDataStructure;
|
||||||
|
|
||||||
|
UCLASS(BlueprintType, Blueprintable)
|
||||||
class LEGUMEMIX_API ULMWeapon : public UObject
|
class LEGUMEMIX_API ULMWeapon : public UObject
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
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();
|
||||||
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
||||||
|
void OnReload(); //To call in blueprint for design utilities
|
||||||
|
void AddAmmo();
|
||||||
|
|
||||||
|
bool HasAmmoInClip();
|
||||||
|
bool HasAmmoInInventory();
|
||||||
};
|
};
|
||||||
|
24
Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h
Normal file
24
Source/LegumeMix/Public/Weapon/LMWeaponDataStructure.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "AnimationBlueprintEditorSettings.h"
|
||||||
|
#include "LMWeaponDataStructure.generated.h"
|
||||||
|
|
||||||
|
USTRUCT(BlueprintType)
|
||||||
|
struct FLMWeaponDataStructure : public FTableRowBase
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
int MaxAmmo; // Max ammo in "inventory"
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
int MaxClipAmmo; // Max ammo in clip
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
TObjectPtr<UStaticMesh> MeshWeapon; //Mesh of the weapon display in the scene
|
||||||
|
|
||||||
|
//UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
//enum AmmoType; //Type of ammo, which ammo this weapon is using
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
TObjectPtr<UAnimBlueprint> AnimationBluePrint; //The animation blueprint to animate the mesh
|
||||||
|
};
|
Reference in New Issue
Block a user