unreal/AdventureCameraPawn.h

76 lines
1.9 KiB
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Pawn.h"
#include "AdventureCameraPawn.generated.h"
UCLASS()
class FRAY_API AAdventureCameraPawn : public APawn
{
GENERATED_BODY()
public:
// Sets default values for this pawn's properties
AAdventureCameraPawn();
UPROPERTY()
UGameViewportClient* Viewport;
UPROPERTY()
FIntPoint ViewSize;
UPROPERTY(BlueprintReadWrite, Category = "Config")
class AAdventureMap* AdvMapRef;
UPROPERTY(BlueprintReadWrite, Category = "Config")
class AAdventurePlayerController* ControllerRef;
UPROPERTY(BlueprintReadWrite, Category = "Config")
class AAdventureCharacter* AdvPawnRef;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Input")
float ESASize;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Input")
float ScrollAccelleration;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Input")
float BaseScrollSpeed;
UPROPERTY()
FVector AdvPawnLocationPrevious;
UPROPERTY()
FVector AdvPawnLocationCurrent;
UPROPERTY()
FVector AdvPawnLocationDelta;
UPROPERTY(BlueprintReadWrite, Category = "Runtime")
bool bAdvPawnIsMoving;
UPROPERTY(BlueprintReadWrite, Category = "Runtime")
class AHexTile* SelectedHex;
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
float ESAMaxBoundSlope;
float ESAMaxBoundIntercept;
float ESAMinBoundSlope;
float ESAMinBoundIntercept;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
UFUNCTION(BlueprintCallable)
void EdgeScrollSide(float AxisValue);
UFUNCTION(BlueprintCallable)
void EdgeScrollVert(float AxisValue);
UFUNCTION(BlueprintCallable)
void FollowAdvPawn();
};