53 lines
1.5 KiB
C++
53 lines
1.5 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "AI/MasterAI.h"
|
|
#include "BossEnemy.generated.h"
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class D1_API ABossEnemy : public AMasterAI
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
ABossEnemy();
|
|
|
|
private:
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category="UI", meta=(AllowPrivateAccess="true"))
|
|
TObjectPtr<class UWidgetComponent> HealthBarComponent;
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Component", meta=(AllowPrivateAccess="true"))
|
|
TObjectPtr<class UStaticMeshComponent> WeaponMeshComponent;
|
|
|
|
protected:
|
|
virtual void BeginPlay() override;
|
|
|
|
protected:
|
|
// Inherited via AMasterAI
|
|
virtual void OnTargetSet(AActor* NewTarget) override;
|
|
|
|
// Inherited via ITargetingInterface
|
|
virtual void OnTargeted(bool bIsTargeted) override;
|
|
|
|
public: // Delegate
|
|
//UCollisionComponent
|
|
void OnHit(FHitResult hitResult);
|
|
//UCombatComponent
|
|
void OnCombatToggled(bool IsCombatEnabled);
|
|
public:
|
|
virtual void PerformDeath() override;
|
|
void SimulateWeaponPhysics();
|
|
void SetBossHealthVisibility(bool IsVisible);
|
|
|
|
private:
|
|
UPROPERTY(EditAnywhere, Blueprintable, Category="Initialization", meta=(AllowPrivateAccess="true"))
|
|
FName AttachSocketName;
|
|
UPROPERTY(EditAnywhere, Blueprintable, Category="Initialization", meta=(AllowPrivateAccess="true"))
|
|
FName WeaponHandSocketName;
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess="true"))
|
|
TObjectPtr<class UUserWidget> BossHealthWidget;
|
|
};
|