36 lines
984 B
C++
Executable File
36 lines
984 B
C++
Executable File
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
#include "Pickup.h"
|
|
#include "Components/BoxComponent.h"
|
|
|
|
// Sets default values
|
|
APickup::APickup(const FObjectInitializer &object_initializer)
|
|
{
|
|
collision = object_initializer.CreateDefaultSubobject<UBoxComponent>(this, FName("Collision"));
|
|
RootComponent = collision;
|
|
collision->SetCollisionProfileName(FName("Pickup"));
|
|
|
|
mesh = object_initializer.CreateDefaultSubobject<UStaticMeshComponent>(this, FName("Mesh"));
|
|
mesh->SetupAttachment(RootComponent);
|
|
mesh->SetCollisionEnabled(ECollisionEnabled::NoCollision);
|
|
|
|
// 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 APickup::BeginPlay()
|
|
{
|
|
Super::BeginPlay();
|
|
|
|
}
|
|
|
|
// Called every frame
|
|
void APickup::Tick(float DeltaTime)
|
|
{
|
|
Super::Tick(DeltaTime);
|
|
|
|
}
|
|
|