mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 00:01:37 -07:00
Add CogSample own BTTask to implement a custom description
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -8,6 +8,7 @@ public class CogSample : ModuleRules
|
||||
|
||||
PublicDependencyModuleNames.AddRange(new string[]
|
||||
{
|
||||
"AIModule",
|
||||
"CogCommon",
|
||||
"Core",
|
||||
"CoreUObject",
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#include "CogSampleBTTask_BlueprintBase.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
FString UCogSampleBTTask_BlueprintBase::GetStaticDescription() const
|
||||
{
|
||||
FString CustomDescripton = GetCustomStaticDescription();
|
||||
|
||||
if (CustomDescripton.IsEmpty() == false)
|
||||
{
|
||||
return CustomDescripton;
|
||||
}
|
||||
|
||||
return Super::GetStaticDescription();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "BehaviorTree/Tasks/BTTask_BlueprintBase.h"
|
||||
#include "CogSampleBTTask_BlueprintBase.generated.h"
|
||||
|
||||
UCLASS(Abstract, Blueprintable)
|
||||
class UCogSampleBTTask_BlueprintBase : public UBTTask_BlueprintBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
|
||||
virtual FString GetStaticDescription() const override;
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent, Category = AI)
|
||||
FString GetCustomStaticDescription() const;
|
||||
};
|
||||
@@ -272,8 +272,6 @@ private:
|
||||
|
||||
void OnGameplayEffectRemoved(const FActiveGameplayEffect& RemovedGameplayEffect);
|
||||
|
||||
void OnCooldownEffectUpdated(const FActiveGameplayEffect& GameplayEffect, bool bIsEffectRemoved);
|
||||
|
||||
void OnGhostTagNewOrRemoved(const FGameplayTag InTag, int32 NewCount);
|
||||
|
||||
void OnScaleAttributeChanged(const FOnAttributeChangeData& Data);
|
||||
|
||||
Reference in New Issue
Block a user