69 lines
1.7 KiB
C++
69 lines
1.7 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* OwningPC;
|
|
UPROPERTY(BlueprintReadWrite, Category = "Config")
|
|
class AAdventureCharacter* FollowPawn;
|
|
|
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Input")
|
|
float ESASize;
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Input")
|
|
float ScrollAccelleration;
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Input")
|
|
float BaseScrollSpeed;
|
|
|
|
protected:
|
|
// Called when the game starts or when spawned
|
|
virtual void BeginPlay() override;
|
|
void GetTheDamnViewport();
|
|
|
|
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()
|
|
void ScrollSide(float AxisValue);
|
|
UFUNCTION()
|
|
void ScrollVert(float AxisValue);
|
|
UFUNCTION(BlueprintCallable)
|
|
void EdgeScrollSide(float AxisValue);
|
|
UFUNCTION(BlueprintCallable)
|
|
void EdgeScrollVert(float AxisValue);
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void FollowAdvPawn(float DeltaSeconds);
|
|
};
|