d29bb501c7
I cleaned up and removed unused functions in both interaction and tempcharacter scripts.
37 lines
710 B
C++
37 lines
710 B
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
#include "Interaction.h"
|
|
|
|
#include "Components/WidgetComponent.h"
|
|
|
|
|
|
|
|
// Sets default values
|
|
AInteraction::AInteraction()
|
|
{
|
|
// 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 AInteraction::BeginPlay()
|
|
{
|
|
Super::BeginPlay();
|
|
|
|
}
|
|
|
|
// Called every frame
|
|
void AInteraction::Tick(float DeltaTime)
|
|
{
|
|
Super::Tick(DeltaTime);
|
|
|
|
}
|
|
|
|
void AInteraction::OnInteract()
|
|
{
|
|
UUserWidget* spawnedWidget = CreateWidget<UUserWidget>(GetWorld(), Widget);
|
|
spawnedWidget->AddToViewport(0);
|
|
}
|
|
|