Implemented Overload Module Gadget Tutorial

This commit is contained in:
Rafal Swierczek 2023-11-03 15:11:14 +00:00
parent 61117272ef
commit 345e5acd08
8 changed files with 74 additions and 8 deletions

View File

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

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ec2d9cddf84ce12c2afd9105364ee6405766ac7f23a19f7b6a515699a18c35b1
size 607443
oid sha256:08b525ee32d982c27c00a940ff67fc86f358c5ddfb953a60bd68ccfebef74e10
size 610106

View File

@ -0,0 +1,25 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "OverloadModuleTutorial.h"
#include "EndlessVendetta/EndlessVendettaCharacter.h"
void AOverloadModuleTutorial::BeginPlay()
{
Super::BeginPlay();
GadgetManager = Cast<AEndlessVendettaCharacter>(GetWorld()->GetFirstPlayerController()->GetPawn())->GadgetManager;
SpawnNewWaypoint(HackTargetWaypointLoc, HackTargetWaypointDesc);
}
void AOverloadModuleTutorial::Tick(float DeltaSeconds)
{
Super::Tick(DeltaSeconds);
if (!GadgetManager->CombatInUse()) return;
SpawnNewWaypoint(ResultWaypointLoc, ResultWaypointDesc);
SetActorTickEnabled(false);
FTimerHandle TimerHandle;
GetWorld()->GetTimerManager().SetTimer(TimerHandle, this, &AOverloadModuleTutorial::FinishedTutorial, 7.5);
}

View File

@ -0,0 +1,35 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "BaseGadgetTutorial.h"
#include "EndlessVendetta/GadgetSystem/GadgetManager.h"
#include "OverloadModuleTutorial.generated.h"
/**
*
*/
UCLASS()
class ENDLESSVENDETTA_API AOverloadModuleTutorial : public ABaseGadgetTutorial
{
GENERATED_BODY()
AGadgetManager* GadgetManager;
void BeginPlay() override;
void Tick(float DeltaSeconds) override;
protected:
UPROPERTY(EditDefaultsOnly, Category = "Gadget Tutorial")
FString HackTargetWaypointDesc;
UPROPERTY(EditDefaultsOnly, Category = "Gadget Tutorial")
FString ResultWaypointDesc;
UPROPERTY(BlueprintReadWrite, Category = "Gadget Tutorial")
FVector HackTargetWaypointLoc;
UPROPERTY(BlueprintReadWrite, Category = "Gadget Tutorial")
FVector ResultWaypointLoc;
};