RoveSoSimulator
Loading...
Searching...
No Matches
RoveSoSimulatorPlayerController.h
1#pragma once
2
3#include "Core/RoverVehiclePawn.h"
4#include "UObject/ObjectMacros.h"
5#include "RoveSoSimulatorPlayerController.generated.h"
6
7class UEnhancedInputLocalPlayerSubsystem;
8class UEnhancedInputComponent;
9
10class ARoverArmPawn;
11class URoveSoSimulatorInstance;
12class URoveSoSimulatorUIManager;
13class URoveSoSimulatorInputManager;
14
15/**
16 * @brief Player controller which possesses the active rover, UI & Input Managers, and input state
17 */
18UCLASS()
19class ARoveSoSimulatorPlayerController : public APlayerController
20{
21 GENERATED_BODY()
22
23public:
24 enum InputState : uint8 {
25 NONE,
26 UNIVERSAL,
27 ROVERDRIVE,
28 ARMCONTROL
29 };
30
31 ARoveSoSimulatorPlayerController();
32 URoveSoSimulatorInstance* GetGame() { return Game; }
33 URoveSoSimulatorInputManager* GetInputManager() { return InputManager; }
34 InputState GetInputState() { return CurrentInputState; }
35 void SetInputState(InputState newState);
36 void QuitGame();
37
38protected:
39 virtual void BeginPlay() override;
40 virtual void SetupInputComponent() override;
41
42 UPROPERTY()
43 URoveSoSimulatorInstance* Game;
44 UPROPERTY()
45 UEnhancedInputLocalPlayerSubsystem* InputSubsystem;
46 UPROPERTY()
47 UEnhancedInputComponent* EI;
48 UPROPERTY(EditDefaultsOnly, Category = "C++ Class Refs")
49 TSubclassOf<URoveSoSimulatorInputManager> InputManagerClass;
50 UPROPERTY(EditDefaultsOnly, Category = "C++ Class Refs")
51 TSubclassOf<URoveSoSimulatorUIManager> UIManagerClass;
52 UPROPERTY()
53 URoveSoSimulatorInputManager* InputManager;
54 UPROPERTY()
55 URoveSoSimulatorUIManager* UIManager;
56 UPROPERTY()
57 ARoverVehiclePawn* Rover;
58 UPROPERTY()
59 ARoverArmPawn* Arm;
60
61 InputState CurrentInputState;
62};