Open 3D Engine GameStateSamples Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
GameStateSamples::GameStatePrimaryUserSelection Class Reference

Game state that is active while waiting to determine who the primary user is. More...

#include <GameStatePrimaryUserSelection.h>

Inherits GameState::IGameState, and AzFramework::InputChannelEventListener.

Public Member Functions

 AZ_CLASS_ALLOCATOR (GameStatePrimaryUserSelection, AZ::SystemAllocator)
 
 AZ_RTTI (GameStatePrimaryUserSelection, "{953A3CBD-92BD-4B9A-9FD2-C1DC6E9A8BF8}", IGameState)
 
 GameStatePrimaryUserSelection ()=default
 Default constructor.
 
 ~GameStatePrimaryUserSelection () override=default
 Default destructor.
 

Protected Member Functions

void OnPushed () override
 GameState::GameState::OnPushed
 
void OnPopped () override
 GameState::GameState::OnPopped
 
void OnEnter () override
 GameState::GameState::OnEnter
 
void OnExit () override
 GameState::GameState::OnExit
 
AZ::s32 GetPriority () const override
 AzFramework::InputChannelEventListener::GetPriority
 
bool OnInputChannelEventFiltered (const AzFramework::InputChannel &inputChannel) override
 
virtual void SetPrimaryLocalUser (AzFramework::LocalUserId localUserId)
 
virtual void PushPrimaryUserMonitorGameState ()
 
virtual void PushMainMenuGameState ()
 
AZ::EntityId m_primaryUserSelectionCanvasEntityId
 Id of the UI canvas being displayed.
 
virtual void LoadPrimaryUserSelectionCanvas ()
 
virtual void UnloadPrimaryUserSelectionCanvas ()
 
virtual const char * GetPrimaryUserSelectionCanvasAssetPath ()
 

Detailed Description

Game state that is active while waiting to determine who the primary user is.

Member Function Documentation

◆ LoadPrimaryUserSelectionCanvas()

void GameStateSamples::GameStatePrimaryUserSelection::LoadPrimaryUserSelectionCanvas ( )
inlineprotectedvirtual

Convenience functions to load and unload the primary user selection UI canvas.

◆ OnInputChannelEventFiltered()

bool GameStateSamples::GameStatePrimaryUserSelection::OnInputChannelEventFiltered ( const AzFramework::InputChannel &  inputChannel)
inlineoverrideprotected

AzFramework::InputChannelEventListener::OnInputChannelEventFiltered Used to detect the press of a button / key that will identify the primary user. If you override this class and wish to detect the primary user through another means, or want the UI displayed to process input, you should override this function to do nothing and handle setting the primary user yourself, before transitioning to the next game state.

◆ PushMainMenuGameState()

void GameStateSamples::GameStatePrimaryUserSelection::PushMainMenuGameState ( )
inlineprotectedvirtual

Convenience function to push the default main menu game state. Override if you wish to push a different main menu game state.

◆ PushPrimaryUserMonitorGameState()

void GameStateSamples::GameStatePrimaryUserSelection::PushPrimaryUserMonitorGameState ( )
inlineprotectedvirtual

Convenience function to push the default primary user monitor game state. Override if you wish to push a different primary user monitor game state.

◆ SetPrimaryLocalUser()

void GameStateSamples::GameStatePrimaryUserSelection::SetPrimaryLocalUser ( AzFramework::LocalUserId  localUserId)
inlineprotectedvirtual

Convenience function to set the primary local user and transition to the next game state

Parameters
[in]localUserIdThe local user id to set as the primary user

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