Source, config, and docs only — UE template assets stay local to save storage. Co-authored-by: Cursor <cursoragent@cursor.com>
124 lines
2.7 KiB
C++
124 lines
2.7 KiB
C++
// Copyright VocationLife Project. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/PlayerController.h"
|
|
#include "VocationTypes.h"
|
|
#include "VocationPlayerController.generated.h"
|
|
|
|
class UInputMappingContext;
|
|
class UInputAction;
|
|
class AVocationHUD;
|
|
|
|
UCLASS()
|
|
class VOCATIONLIFE_API AVocationPlayerController : public APlayerController
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
AVocationPlayerController();
|
|
|
|
virtual void BeginPlay() override;
|
|
virtual void SetupInputComponent() override;
|
|
virtual void OnPossess(APawn* InPawn) override;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "VocationLife|UI")
|
|
void TogglePauseMenu();
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "VocationLife|UI")
|
|
void ShowInteractionPrompt(const FText& Prompt);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "VocationLife|UI")
|
|
void ClearInteractionPrompt();
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "VocationLife|Session")
|
|
void HostCoopGame();
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "VocationLife|Session")
|
|
void FindCoopGames();
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "VocationLife|Session")
|
|
void JoinCoopGame(int32 SessionIndex);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "VocationLife|Input")
|
|
void ApplyInputMappingForCameraMode(EVocationCameraMode CameraMode);
|
|
|
|
UFUNCTION()
|
|
void ApplyLowGraphics();
|
|
|
|
UFUNCTION()
|
|
void ApplyMediumGraphics();
|
|
|
|
UFUNCTION()
|
|
void ApplyHighGraphics();
|
|
|
|
UFUNCTION()
|
|
void ApplyUltraGraphics();
|
|
|
|
UFUNCTION()
|
|
void ApplyRayTracingGraphics();
|
|
|
|
UFUNCTION()
|
|
void JoinFirstFoundSession();
|
|
|
|
UFUNCTION()
|
|
void QuickSave();
|
|
|
|
UFUNCTION()
|
|
void HandleSessionSearchForJoin(const TArray<FString>& SessionNames);
|
|
|
|
protected:
|
|
void CreateRuntimeInputAssets();
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UInputMappingContext> SharedMappingContext;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UInputMappingContext> FirstPersonMappingContext;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UInputMappingContext> TopDownMappingContext;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UInputAction> MoveAction;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UInputAction> LookAction;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UInputAction> JumpAction;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UInputAction> InteractAction;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UInputAction> AttackAction;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UInputAction> ToggleCameraAction;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UInputAction> InventoryAction;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UInputAction> PauseAction;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<AVocationHUD> VocationHUD;
|
|
|
|
UPROPERTY(EditDefaultsOnly, Category = "VocationLife|Input")
|
|
int32 SharedMappingPriority = 0;
|
|
|
|
UPROPERTY(EditDefaultsOnly, Category = "VocationLife|Input")
|
|
int32 ModeMappingPriority = 1;
|
|
|
|
UPROPERTY(EditDefaultsOnly, Category = "VocationLife|Input")
|
|
float MouseSensitivity = 1.f;
|
|
|
|
UPROPERTY(EditDefaultsOnly, Category = "VocationLife|Input")
|
|
float GamepadLookSensitivity = 1.f;
|
|
|
|
bool bPauseMenuOpen = false;
|
|
};
|