7aa3a702d6
Script now looks for the camera on the player making it ready to start moving the camera to the items
62 lines
1.3 KiB
C++
62 lines
1.3 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Camera/CameraComponent.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "Interaction.generated.h"
|
|
|
|
UCLASS()
|
|
class THE_TWILIGHT_ABYSS_API AInteraction : public AActor
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
// Sets default values for this actor's properties
|
|
AInteraction();
|
|
|
|
protected:
|
|
// Called when the game starts or when spawned
|
|
virtual void BeginPlay() override;
|
|
|
|
public:
|
|
// Called every frame
|
|
virtual void Tick(float DeltaTime) override;
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
TSubclassOf<UUserWidget> ShopDialog;
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
TSubclassOf<UUserWidget> ItemSelector;
|
|
|
|
virtual void OnInteract();
|
|
|
|
virtual void RemoveWidget();
|
|
|
|
UPROPERTY()
|
|
UUserWidget* ShopDialogWidget;
|
|
|
|
UPROPERTY()
|
|
UUserWidget* ItemSelectorWidget;
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
float WaitTimer = 8.0f;
|
|
|
|
UPROPERTY()
|
|
bool bisDisabled = false;
|
|
|
|
UFUNCTION(BlueprintCallable, Category= "ButtonLeft")
|
|
virtual void CameraLeftMover();
|
|
|
|
UFUNCTION(BlueprintCallable, Category= "ButtonLeft")
|
|
virtual void CameraRightMover();
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Camera")
|
|
UCameraComponent* MainCamera;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Player")
|
|
ACharacter* TempCharacter;
|
|
};
|
|
|