Implemented Target Elimination Checkpoint

This commit is contained in:
Rafal Swierczek 2023-10-21 17:08:53 +01:00
parent 88f5824f24
commit b4c8ac75c6
36 changed files with 101 additions and 25 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5ff92e3fd19f5c6ab5990b04df89fdff800e92817c8590b51529b0d46b7aab46
size 130912

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ab23608f919ecfc92215a4480723e0e1520ab11a2c64b7ce818aa7eba94dc263
size 21392

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3e288ec30f3b26b7bb4874519eca7cf2192fb9d2c09a84cb2dec4bcdff1044d1
size 54626

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:311f0f503d0da57fc6fbc985d867b9228f21a408771a2fc99529721c8e12c3a0
size 13004

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:34ede5014ff062f3380f92b939c6b4367cab00507155900653e87091ea9cfb90
size 54658

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:abb704094c43932bacf948aa6451819dd13a7b8a461381076432ac89d08be01e
size 54660

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0d0078b843c7d067953620918f93d3f3834389e94368a10ff5cf64c072fc3a4d
size 54606

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:94bfbbff8021abe73e75d71827e07c5baa766e501cabefaeae63ca1f588a7396
size 54570

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0d7bcf8d56e53185921c8a741fe0c75ba93c984c3bf5b8739973156a68297b9c
size 54821

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4a6053e080c36fbe43295469fb7ae72edf2aeb7c01f3f551d60e37275543b23a
size 54630

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ad2c3fac00abe5849662523a1d0fd805b554a62a6600f9e9fee11c5c8b371697
size 15046
oid sha256:d73138039ec29e349f1ba70f6e663c7df352a1d4bccf5df3625b9a30ce9c1ed0
size 14064

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1e8f601f1c0be33c202b9bb03cd129eaa0c44466f712c644c4e4adaccc1d7297
size 452373
oid sha256:6c6110d8157a50cba88d602bfad783df68d380acef66c96145bd841c19096bdd
size 453717

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -59,6 +59,12 @@ void AAI_EnemyController::Tick(float DeltaTime)
}
}
void AAI_EnemyController::AssignPatrolPathLate()
{
Blackboard->SetValueAsBool("IsPatroling", true);
}
void AAI_EnemyController::SetupPerceptionSystem()
{
SightConfig = CreateDefaultSubobject<UAISenseConfig_Sight>(TEXT("Sight Config"));

View File

@ -25,6 +25,9 @@ public:
// Called every frame
virtual void Tick(float DeltaTime) override;
UFUNCTION(BlueprintCallable)
void AssignPatrolPathLate();
private:
UPROPERTY()
class UAISenseConfig_Sight* SightConfig;

View File

@ -49,6 +49,7 @@ void ABountyClass::SpawnCheckpoints()
// Activate the first checkpoint and listen for its completion
BountyCheckpoints[0]->Active = true;
BountyCheckpoints[0]->SpawnWaypoint();
BountyCheckpoints[0]->CheckpointActivated();
BountyCheckpoints[0]->CompletedCheckpoint.AddDynamic(this, &ABountyClass::IncrementBountyCheckpoint);
}
@ -86,6 +87,7 @@ void ABountyClass::IncrementBountyCheckpoint()
// Set the new checkpoint in pos 0 to be active and listen for it's completion
BountyCheckpoints[0]->Active = true;
BountyCheckpoints[0]->SpawnWaypoint();
BountyCheckpoints[0]->CheckpointActivated();
BountyCheckpoints[0]->CompletedCheckpoint.AddDynamic(this, &ABountyClass::IncrementBountyCheckpoint);
}

View File

@ -3,8 +3,8 @@
#pragma once
#include "CoreMinimal.h"
#include "InteractionInterface.h"
#include "EndlessVendetta/BountySystem/CheckpointClass.h"
#include "EndlessVendetta/InteractionInterface.h"
#include "InteractableCP_CallBPEvent.generated.h"
/**

View File

@ -1,9 +1,9 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "PickUpGunTutorialCheckPoint.h"
#include "InteractableCP_CompleteCP.h"
void APickUpGunTutorialCheckPoint::Interact()
void AInteractableCP_CompleteCP::Interact()
{
BroadcastCompletion();
}

View File

@ -5,13 +5,13 @@
#include "CoreMinimal.h"
#include "EndlessVendetta/InteractionInterface.h"
#include "EndlessVendetta/BountySystem/CheckpointClass.h"
#include "PickUpGunTutorialCheckPoint.generated.h"
#include "InteractableCP_CompleteCP.generated.h"
/**
*
*/
UCLASS()
class ENDLESSVENDETTA_API APickUpGunTutorialCheckPoint : public ACheckpointClass, public IInteractionInterface
class ENDLESSVENDETTA_API AInteractableCP_CompleteCP : public ACheckpointClass, public IInteractionInterface
{
GENERATED_BODY()

View File

@ -27,6 +27,15 @@ void ACheckpointClass::SpawnWaypoint()
WaypointActor->SetupWaypoint(WaypointIcon, CheckpointDescription);
}
void ACheckpointClass::UpdateChecpointWaypoint(FString WaypointDesc, FVector WaypointNewLoc)
{
FActorSpawnParameters SpawnParams;
SpawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
if (WaypointActor) WaypointActor->Destroy();
WaypointActor = Cast<AWaypointActor>(GetWorld()->SpawnActor<AActor>(WaypointActorClass, WaypointNewLoc, GetActorRotation(), SpawnParams));
WaypointActor->SetupWaypoint(WaypointIcon, WaypointDesc);
}
// Called every frame
void ACheckpointClass::Tick(float DeltaTime)
{

View File

@ -37,6 +37,8 @@ protected:
CompletedCheckpoint.Broadcast();
}
UFUNCTION(BlueprintCallable)
void UpdateChecpointWaypoint(FString WaypointDesc, FVector WaypointNewLoc);
// Called when the game starts or when spawned
virtual void BeginPlay() override;
@ -50,6 +52,9 @@ public:
void SpawnWaypoint();
UFUNCTION(BlueprintImplementableEvent)
void CheckpointActivated();
// ------ Getters for CP Properties ------
FString GetCheckpointDesc()
{