Updated Combat System to Test GOAP Functionality
This commit is contained in:
parent
6309db6a55
commit
acdb4dde0e
@ -7,6 +7,7 @@
|
|||||||
#include "StatusSystem.h"
|
#include "StatusSystem.h"
|
||||||
#include "Blueprint/UserWidget.h"
|
#include "Blueprint/UserWidget.h"
|
||||||
#include "BehaviorTree/BlackboardComponent.h"
|
#include "BehaviorTree/BlackboardComponent.h"
|
||||||
|
#include "COMP250_1_2101327_AI/GOAP/GOAPAgent.h"
|
||||||
#include "Components/TextBlock.h"
|
#include "Components/TextBlock.h"
|
||||||
#include "Components/ProgressBar.h"
|
#include "Components/ProgressBar.h"
|
||||||
#include "GameFramework/Character.h"
|
#include "GameFramework/Character.h"
|
||||||
@ -61,6 +62,11 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy)
|
|||||||
AzosResource = 10;
|
AzosResource = 10;
|
||||||
IroquoidResource = 10;
|
IroquoidResource = 10;
|
||||||
|
|
||||||
|
EnemyProbertiumResource = 10;
|
||||||
|
EnemyEisResource = 10;
|
||||||
|
EnemyAzosResource = 10;
|
||||||
|
EnemyIroquoidResource = 10;
|
||||||
|
|
||||||
//Disable Character Movement
|
//Disable Character Movement
|
||||||
if (ACharacter* PlayerCharacter = Cast<ACharacter>(GetWorld()->GetFirstPlayerController()->GetPawn()))
|
if (ACharacter* PlayerCharacter = Cast<ACharacter>(GetWorld()->GetFirstPlayerController()->GetPawn()))
|
||||||
{
|
{
|
||||||
@ -85,6 +91,9 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy)
|
|||||||
UpdateActionPoints();
|
UpdateActionPoints();
|
||||||
UpdateResourceBars();
|
UpdateResourceBars();
|
||||||
ClearBattleLog();
|
ClearBattleLog();
|
||||||
|
|
||||||
|
UGOAPAgent* EnemyGOAPAgent = Cast<UGOAPAgent>(Enemy->GetComponentByClass(UGOAPAgent::StaticClass()));
|
||||||
|
TArray<UGOAPAction*> Plannn = EnemyGOAPAgent->Plan(EnemyGOAPAgent->GetWorldState(), EnemyGOAPAgent->Goals);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ATurnBaseCombatV2::EndCombat()
|
void ATurnBaseCombatV2::EndCombat()
|
||||||
|
@ -38,6 +38,14 @@ public:
|
|||||||
int AzosResource = 10;
|
int AzosResource = 10;
|
||||||
UPROPERTY(EditDefaultsOnly)
|
UPROPERTY(EditDefaultsOnly)
|
||||||
int IroquoidResource = 10;
|
int IroquoidResource = 10;
|
||||||
|
UPROPERTY(EditDefaultsOnly)
|
||||||
|
int EnemyProbertiumResource = 10;
|
||||||
|
UPROPERTY(EditDefaultsOnly)
|
||||||
|
int EnemyEisResource = 10;
|
||||||
|
UPROPERTY(EditDefaultsOnly)
|
||||||
|
int EnemyAzosResource = 10;
|
||||||
|
UPROPERTY(EditDefaultsOnly)
|
||||||
|
int EnemyIroquoidResource = 10;
|
||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly)
|
UPROPERTY(EditDefaultsOnly)
|
||||||
UNiagaraSystem* GunEffect;
|
UNiagaraSystem* GunEffect;
|
||||||
|
Loading…
Reference in New Issue
Block a user