#include "ItemDispenser.h" #include "Components/SceneComponent.h" #include "InstantUsable.h" #include "Net/UnrealNetwork.h" void AItemDispenser::SpawnItem() { } void AItemDispenser::Open() { } void AItemDispenser::OnUsed(APlayerCharacter* User, EInputKeys Key) { } void AItemDispenser::OnRep_SpawnedItem(AActor* oldItem) { } void AItemDispenser::OnRep_IsOpen() { } bool AItemDispenser::HasItem() const { return false; } AActor* AItemDispenser::GetItem() const { return NULL; } void AItemDispenser::Close() { } void AItemDispenser::GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const { Super::GetLifetimeReplicatedProps(OutLifetimeProps); DOREPLIFETIME(AItemDispenser, spawnedItem); DOREPLIFETIME(AItemDispenser, IsOpen); } AItemDispenser::AItemDispenser() { this->Root = CreateDefaultSubobject(TEXT("Root")); this->Usable = CreateDefaultSubobject(TEXT("Usable")); this->itemClass = NULL; this->spawnedItem = NULL; this->ItemSpawnTime = 0.00f; this->InitialItemSpawnTime = 0.00f; this->IsOpen = false; this->KillItemsOnDestuction = true; }