Space Plunder
Loading...
Searching...
No Matches
AMenuSystemPlayerController Class Reference

#include <MenuSystemPlayerController.h>

Inheritance diagram for AMenuSystemPlayerController:
APlayerControllerBase IPlayerOptions IControllerInterface IPlayerControllerInterface ISaveLoad

Public Member Functions

 AMenuSystemPlayerController (const FObjectInitializer &ObjectInitializer)
 
void CreateLobbyWidget ()
 
bool GetIsReady () const
 
void SetReady (const bool bValue=true)
 
void StartCountdown (const int32 Delay) const
 
void CancelCountdown () const
 
void SetPlayers (const TArray< FUserProfile > &Players) const
 
- Public Member Functions inherited from APlayerControllerBase
virtual void GetAudioListenerPosition (FVector &OutLocation, FVector &OutFrontDir, FVector &OutRightDir) const override
 
virtual void BindActions (UInputMappingContext *Context)
 
virtual bool SetPlayerLookInverted (const bool bInvert=true) override
 
virtual bool SetPlayerLookHorizontalInverted (const bool bInvert=true) override
 
virtual float SetCameraSensitivity (const float NewValue) override
 
virtual float SetCameraHorizontalSensitivity (const float NewValue) override
 
virtual float SetCameraVerticalSensitivity (const float NewValue) override
 
virtual void SetCameraAimedSensitivityMultiplier (const float NewValue) override
 
virtual void SetCameraUseSeparateAxisSensitivity (const bool bValue) override
 
virtual void SetAimAssistLevel (const int32 Value) override
 
virtual void SetPlayerUsingController (const bool bValue) override
 
virtual bool GetPlayerUsingController () override
 
virtual bool SaveCurrentPlayerOptions (const FAudioPlayerOptions AudioSettings) override
 
virtual float GetCameraSensitivity () const override
 
virtual float GetCameraAimedSensitivityMultiplier () const override
 
virtual float GetCameraHorizontalSensitivity () const override
 
virtual float GetCameraVerticalSensitivity () const override
 
virtual bool GetCameraUseSeparateAxisSensitivity () const override
 
virtual bool GetPlayerLookInverted () const override
 
virtual bool GetPlayerHorizontalInverted () const override
 
virtual int32 GetAimAssistLevel () const override
 
virtual FAudioPlayerOptions GetPlayerAudioSettings () const override
 
virtual bool RegisterLayer (const FGameplayTag LayerName, UUserWidget *LayerWidget) override
 
virtual UUserWidget * PushContentToLayer (const FGameplayTag LayerName, const TSoftClassPtr< UUserWidget > WidgetClass) override
 
virtual bool PopContentFromLayer (const FGameplayTag LayerName) override
 
virtual bool ClearLayer (const FGameplayTag LayerName) override
 
virtual bool ToggleWidget (const FGameplayTag LayerName, UUserWidget *Widget) override
 
virtual UUserWidget * AddWidgetToLayer (const FGameplayTag LayerName, const TSoftClassPtr< UUserWidget > WidgetClass) override
 
virtual UUserWidget * GetContentFromLayer (const FGameplayTag LayerName, const TSoftClassPtr< UUserWidget > WidgetClass) override
 
virtual UUserWidget * AddWidgetToLayerWithSlot (const FGameplayTag LayerName, const FGameplayTag SlotTag, const TSoftClassPtr< UUserWidget > WidgetClass) override
 
virtual void OpenRadialMenu (const FRadialMenuData &Data) override
 
virtual int32 CloseRadialMenu () override
 
virtual bool GetIsRadialMenuOpen () const override
 
virtual void SetCharacterMode (const FGameplayTag &Mode) override
 
virtual FGameplayTag GetCharacterMode () const override
 
virtual void ToggleGameLog () override
 
virtual FVector2D GetLookAxis () const override
 
virtual FVector2D GetMoveAxis () const override
 
virtual FVector2D GetScreenCenter () const override
 
virtual FVector GetPawnLocation () const override
 
virtual void GetControllerViewPoint (FVector &out_Location, FRotator &out_Rotation) const override
 
virtual bool SaveGame () override
 
virtual bool LoadGame () override
 
void OnCharacterModeChanged (const FGameplayTag &Mode)
 

Protected Member Functions

virtual void BeginPlay () override
 
virtual void OnNetCleanup (UNetConnection *Connection) override
 
- Protected Member Functions inherited from APlayerControllerBase
virtual void SetupInputs ()
 
virtual void SetupComponents ()
 
virtual bool SavePlayerOptions (const FString &SlotName="Default")
 
virtual bool LoadPlayerOptions (const FString &SlotName="Default")
 
virtual void ApplySettings (const class USettingsSaveGame *LoadedPlayerSettings)
 
virtual USettingsSaveGameApplySettingsToSaveGame (class USettingsSaveGame *LoadedPlayerSettings)
 
virtual void OnPossess (APawn *NewPawn) override
 
virtual void OnRep_Pawn () override
 
virtual void SetupInputComponent () override
 
virtual void OnPawnSpawn ()
 
virtual void OnPawnSpawnComplete ()
 
virtual float CalculateCameraSensitivity (const float CameraInput) const
 
virtual void MenuConfirmAction (const FInputActionValue &Value)
 
virtual void MenuBackAction (const FInputActionValue &Value)
 
virtual void SelectionUpAction (const FInputActionValue &Value)
 
virtual void ForwardMovementAction (const FInputActionValue &Value)
 
virtual void RightMovementAction (const FInputActionValue &Value)
 
virtual void CameraUpAction (const FInputActionValue &Value)
 
virtual void CameraRightAction (const FInputActionValue &Value)
 
virtual void CharacterModeAction (const FInputActionValue &Value)
 
IHUDInterfaceGetHUDInterface ()
 
ICharacterBaseInterfaceGetCharacterInterface ()
 
void LogDebugError (const FString &Message) const
 
void LogDebugError (const FString &Message, const int32 Value) const
 
void LogDebugError (const FString &Message, const float Value) const
 
void LogDebugWarning (const FString &Message) const
 
void LogDebugWarning (const FString &Message, const int32 Value) const
 
void LogDebugWarning (const FString &Message, const float Value) const
 
void LogDebugMessage (const FString &Message, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const int32 Value, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const float Value, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const bool bValue, const bool bWarning, const bool bError) const
 
void LogOnScreenMessage (const int32 Key, const FString &Message, FColor Color=FColor::Green) const
 
void SetCategoryName (const FLogCategoryBase &Category)
 

Protected Attributes

class ULobbyMenuSystemLobbyWidget = nullptr
 
- Protected Attributes inherited from APlayerControllerBase
FGameplayTag CharacterMode = FGameplayTag(CharacterModeTags::Default)
 
int32 MaxPawnSpawnAttempts = 5
 
bool bAimed = false
 

Private Member Functions

void SetInputModeUI ()
 

Private Attributes

bool bPlayerReady = false
 
bool bInLobby = false
 
TSubclassOf< UUserWidget > LobbyWidgetClass
 

Additional Inherited Members

- Public Attributes inherited from APlayerControllerBase
TObjectPtr< UInputMappingContext > MenuInputMappingContext = nullptr
 
TObjectPtr< UInputMappingContext > MainInputMappingContext = nullptr
 
bool bDebuggingMode = false
 
FName AudioSocket = FName("head")
 

Constructor & Destructor Documentation

◆ AMenuSystemPlayerController()

AMenuSystemPlayerController::AMenuSystemPlayerController ( const FObjectInitializer & ObjectInitializer)
14 :Super(ObjectInitializer)
15{
16 const ConstructorHelpers::FClassFinder<UUserWidget> LobbyWidgetBP(TEXT("/MenuSystem/Widgets/Multiplayer/WBP_LobbyMenu"));
17 if (!ensure(LobbyWidgetBP.Class != nullptr)) return;
18 LobbyWidgetClass = LobbyWidgetBP.Class;
19}
TSubclassOf< UUserWidget > LobbyWidgetClass
Definition MenuSystemPlayerController.h:55

Member Function Documentation

◆ BeginPlay()

void AMenuSystemPlayerController::BeginPlay ( )
overrideprotectedvirtual

Reimplemented from APlayerControllerBase.

22{
23 Super::BeginPlay();
25}
void SetInputModeUI()
Definition MenuSystemPlayerController.cpp:37

◆ CancelCountdown()

void AMenuSystemPlayerController::CancelCountdown ( ) const

◆ CreateLobbyWidget()

void AMenuSystemPlayerController::CreateLobbyWidget ( )

◆ GetIsReady()

bool AMenuSystemPlayerController::GetIsReady ( ) const
inline
24{return bPlayerReady;};
bool bPlayerReady
Definition MenuSystemPlayerController.h:50

◆ OnNetCleanup()

void AMenuSystemPlayerController::OnNetCleanup ( UNetConnection * Connection)
overrideprotectedvirtual
28{
29 IMenuSystem* GameInstance = Cast<IMenuSystem>(GetGameInstance());
30 if(GameInstance != nullptr)
31 {
32 GameInstance->DestroySession();
33 }
34 Super::OnNetCleanup(Connection);
35}
Definition MenuSystem.h:19
virtual void DestroySession()=0

◆ SetInputModeUI()

void AMenuSystemPlayerController::SetInputModeUI ( )
private
38{
39 const FInputModeUIOnly InputMode;
40 SetInputMode(InputMode);
41 bShowMouseCursor = true;
42}

◆ SetPlayers()

void AMenuSystemPlayerController::SetPlayers ( const TArray< FUserProfile > & Players) const

◆ SetReady()

void AMenuSystemPlayerController::SetReady ( const bool bValue = true)
inline
26{bPlayerReady = bValue;};

◆ StartCountdown()

void AMenuSystemPlayerController::StartCountdown ( const int32 Delay) const

Member Data Documentation

◆ bInLobby

bool AMenuSystemPlayerController::bInLobby = false
private

◆ bPlayerReady

bool AMenuSystemPlayerController::bPlayerReady = false
private

◆ LobbyWidget

class ULobbyMenuSystem* AMenuSystemPlayerController::LobbyWidget = nullptr
protected

◆ LobbyWidgetClass

TSubclassOf<UUserWidget> AMenuSystemPlayerController::LobbyWidgetClass
private

The documentation for this class was generated from the following files: