-
Notifications
You must be signed in to change notification settings - Fork 0
/
BasicAI.h
59 lines (38 loc) · 1.19 KB
/
BasicAI.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#pragma once
#include "Animation/AnimMontage.h"
#include "GameFramework/Character.h"
#include "BasicAI.generated.h"
/**
*
*/
UCLASS()
class MUTANTSURVIVAL_API ABasicAI : public ACharacter
{
GENERATED_UCLASS_BODY()
public:
UPROPERTY(Replicated, EditAnywhere, BlueprintReadOnly, Category = AttackMechanic)
bool attack;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = AttackMechanic)
float attackRate;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = AttackMechanic)
float attackCD;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = test)
TSubclassOf<class ATriggerBox> newBox;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = AttackMechanic)
float attackRadius;
UPROPERTY(Replicated, EditAnywhere, BlueprintReadWrite, Category = Attributes)
float health;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Attributes)
float maxHealth;
private:
float targetDelay;
const float MAX_TARGET_DELAY = 5;
AActor *Player;
int32 i = 0;
void setAttack();
virtual void PostInitializeComponents() override;
virtual void BeginPlay() override;
virtual void Tick(float DeltaSeconds) override;
AActor *closestPlayer;
void recalculateClosest();
};