[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 "Ammo/LMAmmo.h"
|
||||
#include "Player/LMBulletInfo.h"
|
||||
#include "Player/LMHealthComponent.h"
|
||||
#include "Player/LMHitBox.h"
|
||||
#include "Weapon/LMWeaponManager.h"
|
||||
|
||||
@ -25,6 +26,7 @@ ALMPlayer::ALMPlayer()
|
||||
// ArmsMesh->SetupAttachment(Camera);
|
||||
|
||||
SpreadStream = FRandomStream(FMath::Rand());
|
||||
HealthComponent = CreateDefaultSubobject<ULMHealthComponent>(TEXT("HealthComponent"));
|
||||
}
|
||||
|
||||
void ALMPlayer::BeginPlay()
|
||||
@ -34,6 +36,8 @@ void ALMPlayer::BeginPlay()
|
||||
WeaponManager->WeaponSwitched.AddUniqueDynamic(this, &ALMPlayer::WeaponSwitched);
|
||||
|
||||
GetCamera()->SetFieldOfView(ULMUserSettings::GetLegumixUserSettings()->FieldOfView);
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool ALMPlayer::PickUpAmmo(ALMAmmo* Ammo)
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
class UCameraComponent;
|
||||
class ULMWeaponManager;
|
||||
|
||||
class ULMHealthComponent;
|
||||
class ALMAmmo;
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnRequestUnpauseSignature);
|
||||
@ -110,6 +110,9 @@ private:
|
||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Legumix, meta = (AllowPrivateAccess = true))
|
||||
TObjectPtr<UCameraComponent> Camera;
|
||||
|
||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Legumix, meta = (AllowPrivateAccess = true))
|
||||
TObjectPtr<ULMHealthComponent> HealthComponent;
|
||||
|
||||
private:
|
||||
#if WITH_EDITORONLY_DATA
|
||||
/** If set, bullet debug will be drawn. */
|
||||
|
Reference in New Issue
Block a user