vampires/Source/vampires/EnemyCharacter.h

52 lines
1.0 KiB
C
Raw Normal View History

2024-06-12 21:42:22 +01:00
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
2024-11-17 20:02:59 +00:00
#include "HealthComponent.h"
2024-06-12 21:42:22 +01:00
#include "VampireCharacter.h"
#include "EnemyCharacter.generated.h"
2024-11-14 18:39:20 +00:00
class UObjectPoolComponent;
class UBehaviorTree;
class AEXPPickup;
2024-06-12 21:42:22 +01:00
/**
*
*/
UCLASS()
class VAMPIRES_API AEnemyCharacter : public AVampireCharacter
{
GENERATED_BODY()
public:
UPROPERTY(EditDefaultsOnly)
TSubclassOf<AEXPPickup> EXPPickupTemplate = nullptr;
2024-06-12 21:42:22 +01:00
2024-08-22 22:11:24 +01:00
private:
2024-06-12 21:42:22 +01:00
UPROPERTY(EditDefaultsOnly, Meta = (AllowPrivateAccess = "true"))
UBehaviorTree* BehaviorTree = nullptr;
2024-08-22 22:11:24 +01:00
UObjectPoolComponent* ObjectPoolComponent = nullptr;
2024-06-12 21:42:22 +01:00
public:
AEnemyCharacter(const FObjectInitializer& ObjectInitializer);
protected:
virtual void BeginPlay() override;
public:
virtual void Tick(float DeltaTime) override;
2024-06-14 23:19:05 +01:00
UBehaviorTree* GetBehaviorTree();
UFUNCTION()
2024-11-17 20:02:59 +00:00
virtual void OnDamaged(FDamageInfo damageInfo);
2024-06-14 23:19:05 +01:00
UFUNCTION()
2024-11-17 20:02:59 +00:00
virtual void OnDeath(FDamageInfo damageInfo);
2024-08-22 22:11:24 +01:00
private:
UFUNCTION()
void ResetHealth();
2024-06-12 21:42:22 +01:00
};