6faa177f96
Referenced the two buy confirms screen so I can just hide them and cache them upon the start of the game to optimize and fix many bugs such as being able to stack the buy screens.
102 lines
2.3 KiB
C++
102 lines
2.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, Category= "Widgets")
|
|
TSubclassOf<UUserWidget> ShopDialog;
|
|
|
|
UPROPERTY(EditAnywhere, Category= "Widgets")
|
|
TSubclassOf<UUserWidget> ItemSelector;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Widgets")
|
|
TSubclassOf<UUserWidget> BuyBuffText;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Widgets")
|
|
TSubclassOf<UUserWidget> BuyHealingText;
|
|
|
|
virtual void OnInteract();
|
|
|
|
virtual void RemoveWidget();
|
|
|
|
UPROPERTY()
|
|
UUserWidget* ShopDialogWidget;
|
|
|
|
UPROPERTY()
|
|
UUserWidget* ItemSelectorWidget;
|
|
|
|
UPROPERTY()
|
|
UUserWidget* BuyBuffTextWidget;
|
|
|
|
UPROPERTY()
|
|
UUserWidget* BuyHealingTextWidget;
|
|
|
|
UPROPERTY(EditAnywhere, Category= "Widgets")
|
|
float WaitTimer = 8.0f;
|
|
|
|
UPROPERTY()
|
|
bool bisDisabled = false;
|
|
|
|
UPROPERTY()
|
|
bool bDisableShopDialMove = 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;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Items")
|
|
AActor* HealingItem;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Items")
|
|
AActor* BuffItem;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "ConfirmButtons")
|
|
virtual void CancelPurchase();
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "ConfirmButtons")
|
|
virtual void HealingPurchase();
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "ConfirmButtons")
|
|
virtual void BuffPurchase();
|
|
|
|
private:
|
|
|
|
FVector TargetHealingLocation;
|
|
FVector TargetBuffLocation;
|
|
FVector CameraLocation;
|
|
|
|
FProperty* Property;
|
|
FProperty* BuyBuffProperty;
|
|
FProperty* BuyHealingProperty;
|
|
};
|
|
|