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


#include "PistolClass.h"


// Sets default values
APistolClass::APistolClass()
{
	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;
}

// Called when the game starts or when spawned
void APistolClass::BeginPlay()
{
	Super::BeginPlay();
	
}

// Called every frame
void APistolClass::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);
}

void APistolClass::Fire()
{
	Super::Fire();
	UE_LOG(LogTemp, Display, TEXT("Testing overrides: Pistol has been fired"));
}

void APistolClass::ClickDetectionTimer()
{
	Super::ClickDetectionTimer();
}

void APistolClass::CancelFire()
{
	if (bulletCountShoot <= 0) return;
	UE_LOG(LogTemp, Display, TEXT("FireCancelled"));
	bulletCountShoot = 0;
	GunStartArrow->SetRelativeRotation(FRotator(0));
	//playerInWorld->GetController()->SetControlRotation(FRotator(0, playerInWorld->GetActorRotation().Yaw, playerInWorld->GetActorRotation().Roll));
	bStopShooting = true;
	nullSamples();
}

