45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "AI/MasterAI.h"
|
|
#include "MobEnemy.generated.h"
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class D1_API AMobEnemy : public AMasterAI
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
AMobEnemy();
|
|
|
|
private:
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category="UI", meta=(AllowPrivateAccess="true"))
|
|
TObjectPtr<class UWidgetComponent> HealthBarComponent;
|
|
|
|
protected:
|
|
virtual void BeginPlay() override;
|
|
|
|
protected:
|
|
// 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();
|
|
|
|
protected:
|
|
UPROPERTY(EditAnywhere, Blueprintable, Category="Initialization", meta=(AllowPrivateAccess="true"))
|
|
FName AttachSocketName;
|
|
UPROPERTY(EditAnywhere, Blueprintable, Category="Initialization", meta=(AllowPrivateAccess="true"))
|
|
FName WeaponHandSocketName;
|
|
};
|