#include "K41Mushroom.h"
#include "EK41MushroomState.h"
#include "Net/UnrealNetwork.h"
#include "Components/StaticMeshComponent.h"
#include "AkComponent.h"
#include "AuthoritativePoolableActorComponent.h"

void AK41Mushroom::OnRep_CurrentState(EK41MushroomState previousState)
{

}

bool AK41Mushroom::IsInAnyState(TArray<EK41MushroomState> mushroomStates) const
{
	return false;
}

bool AK41Mushroom::IsDecayTimerActive() const
{
	return false;
}

float AK41Mushroom::GetSpawnDuration() const
{
	return 0.0f;
}

EK41MushroomState AK41Mushroom::GetMushroomState() const
{
	return EK41MushroomState::InPool;
}

bool AK41Mushroom::GetHasBeenPickedUp() const
{
	return false;
}

void AK41Mushroom::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME(AK41Mushroom, _currentState);
	DOREPLIFETIME(AK41Mushroom, _decayTimer);
}

AK41Mushroom::AK41Mushroom()
{
	this->_mushroomMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MushroomMesh"));
	this->_mushroomBaseMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MushroomBaseMesh"));
	this->_akComponent = CreateDefaultSubobject<UAkComponent>(TEXT("AkComponent"));
	this->_currentState = EK41MushroomState::InPool;
	this->_poolableActorComponent = CreateDefaultSubobject<UAuthoritativePoolableActorComponent>(TEXT("PoolableActorComponent"));
	this->_maxDistanceFromPLayerToTriggerDecayEndAudioEvent = 1000.000000;
	this->_vfxDestroyDurationAfterDecay = 0.250000;
	this->_heightOffsetForUnderPalletDetection = 25.000000;
}
