Space Plunder
Loading...
Searching...
No Matches
AIControllerBase.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "AIController.h"
9#include "AIControllerBase.generated.h"
10
11DECLARE_LOG_CATEGORY_CLASS(LogAIControllerBase, Display, All);
12
13UCLASS()
14class BASEHELPERS_API AAIControllerBase : public AAIController, public IControllerInterface, public ISaveLoad
15{
16 GENERATED_BODY()
17
18public:
20
21 //~ Controller Interface ~//
22 virtual FVector GetPawnLocation() const override;
23 virtual void GetControllerViewPoint(FVector& out_Location, FRotator& out_Rotation) const override;
24 //~ Controller Interface ~//
25
26 //~ ISaveLoad ~//
27 virtual bool SaveGame() override;
28 virtual bool LoadGame() override;
29 //~ ISaveLoad ~//
30
31
32 //~ Generic Team Interface
33 virtual ETeamAttitude::Type GetTeamAttitudeTowards(const AActor& Other) const override;
34 virtual void SetGenericTeamId(const FGenericTeamId& NewTeamID) override;
35 virtual FGenericTeamId GetGenericTeamId() const override{return TeamID;};
36 //~ Generic Team Interface
37
38protected:
39 virtual void BeginPlay() override;
40 virtual void OnPossess(APawn* InPawn) override;
41
42 //~ Generic Team Interface
43 UPROPERTY(EditAnywhere, BlueprintReadOnly,Category="AI|Team")
44 FGenericTeamId TeamID;
45 UFUNCTION(BlueprintCallable, Category="AI")
46 int32 GetTeamID() const{return (TeamID == FGenericTeamId::NoTeam) ? INDEX_NONE : (int32)TeamID;};
47 //~ Generic Team Interface
48
49 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "AI")
50 TObjectPtr<UBehaviorTree> Behaviour = nullptr;
51
52 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI|Debugging")
53 bool bDebuggingMode = false;
54
55 void LogDebugError(const FString& Message) const;
56 void LogDebugError(const FString& Message, const int32 Value) const;
57 void LogDebugError(const FString& Message, const float Value) const;
58 void LogDebugWarning(const FString& Message) const;
59 void LogDebugWarning(const FString& Message, const int32 Value) const;
60 void LogDebugWarning(const FString& Message, const float Value) const;
61
62 void LogDebugMessage(const FString& Message, const bool bWarning = false, const bool bError = false) const;
63 void LogDebugMessage(const FString& Message, const int32 Value, const bool bWarning = false, const bool bError = false) const;
64 void LogDebugMessage(const FString& Message, const float Value, const bool bWarning = false, const bool bError = false) const;
65 void LogDebugMessage(const FString& Message, const bool bValue, const bool bWarning, const bool bError) const;
66 void LogOnScreenMessage(const int32 Key, const FString& Message, FColor Color = FColor::Green) const;
67
68 void SetCategoryName(const FLogCategoryBase& Category){CategoryName = Category.GetCategoryName();};
69
70private:
71 FLogCategoryName CategoryName = LogAIControllerBase.GetCategoryName();
72
73
74};
DECLARE_LOG_CATEGORY_CLASS(LogAIControllerBase, Display, All)
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition AIControllerBase.h:15
virtual FGenericTeamId GetGenericTeamId() const override
Definition AIControllerBase.h:35
Definition ControllerInterface.h:20
Definition SaveLoad.h:20