// Fill out your copyright notice in the Description page of Project Settings.


#include "RingModuleTutorial.h"
#include "EndlessVendetta/EndlessVendettaCharacter.h"


void ARingModuleTutorial::BeginPlay()
{
	Super::BeginPlay();
	GadgetManager = Cast<AEndlessVendettaCharacter>(GetWorld()->GetFirstPlayerController()->GetPawn())->GadgetManager;
	SpawnNewWaypoint(HackTargetWaypointLoc, HackTargetWaypointDesc);
}

void ARingModuleTutorial::Tick(float DeltaSeconds)
{
	Super::Tick(DeltaSeconds);

	if (!GadgetManager->ReconInUse()) return;

	SpawnNewWaypoint(ResultWaypointLoc, ResultWaypointDesc);
	SetActorTickEnabled(false);
	FTimerHandle TimerHandle;
	GetWorld()->GetTimerManager().SetTimer(TimerHandle, this, &ARingModuleTutorial::FinishedTutorial, 7.5);
}


