GigaPasjans
Loading...
Searching...
No Matches
Game::Solitaire Class Reference

Main game class managing the Solitaire session. More...

#include <Solitaire.h>

Inheritance diagram for Game::Solitaire:
Collaboration diagram for Game::Solitaire:

Public Member Functions

Phosphorus::ProductInfo GetProductInfo () override
 Returns metadata about the game product.
 
 Solitaire (Phosphorus::GameOptions &options)
 
void Run () override
 Starts the game loop.
 
void OnSurfaceCallback (const String &id) override
 Called when a UI surface interaction occurs.
 
void OnRender () override
 Renders the game frame.
 
void PushScreen (IScreen *screen)
 Pushes a new screen onto the stack.
 
void PopScreen (int32 count=1)
 Pops one or more screens from the stack.
 
void PlayOneShot (const String &path)
 Plays a sound from the given file path.
 
void SetTitle (const WideString &title)
 Sets the window or UI title.
 
void OnWin ()
 Called when the game is won.
 
void OnLoadFromFile ()
 Loads a saved game session from file.
 
void OnNewGame ()
 Starts a new game session.
 
Phosphorus::VfsManagerGetVfsManager ()
 Returns virtual file system manager.
 
void ProvideActions (Andromenda::ActionRegistry &registry) override
 Provides UI and input actions to the action registry.
 
- Public Member Functions inherited from Phosphorus::IGame
 IGame (GameOptions &options, Andromenda::Surface *surface)
 
void Register ()
 
- Public Member Functions inherited from Phosphorus::GameObjectRegistry
GameObjectGetGameObject (const String &identifier)
 Find GameObject with given name.
 
void Clear ()
 Deletes all GameObject from registry.
 
GameObjectGetGameObjectByUniqueId (const String &identifier)
 Find GameObject with unique id.
 
void RegisterGameObject (const String &name, GameObject *object)
 Registers given GameObject.
 

Static Public Member Functions

static SolitaireSettingsGetSettings ()
 Returns a pointer to global user settings.
 

Public Attributes

GameState GameState = GameState::Uninitialized
 Current game state.
 
SolitaireStatisticsStatistics = nullptr
 Pointer to gameplay statistics object.
 
SolitaireSessionSettingsSessionSettings = nullptr
 Pointer to session settings object.
 
- Public Attributes inherited from Phosphorus::IGame
GameObjectGameSettings
 

Additional Inherited Members

- Protected Member Functions inherited from Phosphorus::GameObjectRegistry
std::unordered_map< String, GameObject * > & getMap ()
 
const std::unordered_map< String, GameObject * > & getMap () const
 
- Protected Attributes inherited from Phosphorus::IGame
GameOptions m_Options
 Game options determined by GameBootstrapper.
 
Andromenda::Surfacem_Surface
 Main game renderer.
 
VfsManager m_VfsManager
 Main game asset manager.
 
- Protected Attributes inherited from Phosphorus::GameObjectRegistry
std::unordered_map< String, GameObject * > m_GameObjects
 

Detailed Description

Main game class managing the Solitaire session.

Member Function Documentation

◆ GetProductInfo()

Phosphorus::ProductInfo Game::Solitaire::GetProductInfo ( )
overridevirtual

Returns metadata about the game product.

Implements Phosphorus::IGame.

◆ OnRender()

void Game::Solitaire::OnRender ( )
overridevirtual

Renders the game frame.

Implements Phosphorus::IGame.

◆ OnSurfaceCallback()

void Game::Solitaire::OnSurfaceCallback ( const String & id)
overridevirtual

Called when a UI surface interaction occurs.

Implements Phosphorus::IGame.

◆ ProvideActions()

void Game::Solitaire::ProvideActions ( Andromenda::ActionRegistry & registry)
overridevirtual

Provides UI and input actions to the action registry.

Implements Andromenda::IActionProvider.

◆ Run()

void Game::Solitaire::Run ( )
overridevirtual

Starts the game loop.

Implements Phosphorus::IGame.


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