[UPD] Add player HealthComponent and hitboxes
This commit is contained in:
parent
2790a0eb40
commit
838fa55cc5
BIN
Content/Legumix/Player/BP_Play.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Player/BP_Play.uasset
(Stored with Git LFS)
Binary file not shown.
@ -9,6 +9,7 @@
|
|||||||
#include "Camera/CameraComponent.h"
|
#include "Camera/CameraComponent.h"
|
||||||
#include "Ammo/LMAmmo.h"
|
#include "Ammo/LMAmmo.h"
|
||||||
#include "Player/LMBulletInfo.h"
|
#include "Player/LMBulletInfo.h"
|
||||||
|
#include "Player/LMHealthComponent.h"
|
||||||
#include "Player/LMHitBox.h"
|
#include "Player/LMHitBox.h"
|
||||||
#include "Weapon/LMWeaponManager.h"
|
#include "Weapon/LMWeaponManager.h"
|
||||||
|
|
||||||
@ -25,6 +26,7 @@ ALMPlayer::ALMPlayer()
|
|||||||
// ArmsMesh->SetupAttachment(Camera);
|
// ArmsMesh->SetupAttachment(Camera);
|
||||||
|
|
||||||
SpreadStream = FRandomStream(FMath::Rand());
|
SpreadStream = FRandomStream(FMath::Rand());
|
||||||
|
HealthComponent = CreateDefaultSubobject<ULMHealthComponent>(TEXT("HealthComponent"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ALMPlayer::BeginPlay()
|
void ALMPlayer::BeginPlay()
|
||||||
@ -34,6 +36,8 @@ void ALMPlayer::BeginPlay()
|
|||||||
WeaponManager->WeaponSwitched.AddUniqueDynamic(this, &ALMPlayer::WeaponSwitched);
|
WeaponManager->WeaponSwitched.AddUniqueDynamic(this, &ALMPlayer::WeaponSwitched);
|
||||||
|
|
||||||
GetCamera()->SetFieldOfView(ULMUserSettings::GetLegumixUserSettings()->FieldOfView);
|
GetCamera()->SetFieldOfView(ULMUserSettings::GetLegumixUserSettings()->FieldOfView);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ALMPlayer::PickUpAmmo(ALMAmmo* Ammo)
|
bool ALMPlayer::PickUpAmmo(ALMAmmo* Ammo)
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
class UCameraComponent;
|
class UCameraComponent;
|
||||||
class ULMWeaponManager;
|
class ULMWeaponManager;
|
||||||
|
class ULMHealthComponent;
|
||||||
class ALMAmmo;
|
class ALMAmmo;
|
||||||
|
|
||||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnRequestUnpauseSignature);
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnRequestUnpauseSignature);
|
||||||
@ -110,6 +110,9 @@ private:
|
|||||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Legumix, meta = (AllowPrivateAccess = true))
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Legumix, meta = (AllowPrivateAccess = true))
|
||||||
TObjectPtr<UCameraComponent> Camera;
|
TObjectPtr<UCameraComponent> Camera;
|
||||||
|
|
||||||
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Legumix, meta = (AllowPrivateAccess = true))
|
||||||
|
TObjectPtr<ULMHealthComponent> HealthComponent;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if WITH_EDITORONLY_DATA
|
#if WITH_EDITORONLY_DATA
|
||||||
/** If set, bullet debug will be drawn. */
|
/** If set, bullet debug will be drawn. */
|
||||||
|
Reference in New Issue
Block a user