Polygon Dash
Loading...
Searching...
No Matches
ConfigManager Struct Reference

Load and store game behavior parameters. More...

Public Member Functions

 ~this ()
 Reset to the default parameters when destroyed.
 

Static Public Member Functions

static ConfigManagerGetInstance ()
 Return a static instance of ConfigManager for global use.
 
static void ClearInstance ()
 Reset the global ConfigManager instance.
 
static void SetGravity (float gravity)
 Set a new gravity value.
 
static float LoadGravity ()
 Get the current gravity value.
 
static void SetCellSize (int cellSize)
 Set a new size for each grid cell.
 
static int LoadCellSize ()
 Get the current size for each grid cell.
 
static void SetPlayerSpeed (int playerSpeed)
 Set a new speed for the player.
 
static int LoadPlayerSpeed ()
 Get the current speed for the player.
 
static void SetSpritePath (string sprite, string path)
 Set a new sprite file path for the player.
 
static string LoadSpritePath (string sprite)
 Get the current sprite file path for the player.
 
static void SetBounceHeight (float bounceHeight)
 Set a new bounce height.
 
static float LoadBounceHeight ()
 Get the current bounce height.
 

Detailed Description

Load and store game behavior parameters.

Member Function Documentation

◆ ClearInstance()

static void ConfigManager::ClearInstance ( )
inlinestatic

Reset the global ConfigManager instance.

This resets the parameters.

See also
~this

◆ GetInstance()

static ConfigManager * ConfigManager::GetInstance ( )
inlinestatic

Return a static instance of ConfigManager for global use.

Returns
the global ConfigManager.

◆ LoadBounceHeight()

static float ConfigManager::LoadBounceHeight ( )
inlinestatic

Get the current bounce height.

Returns
the bounce height.

◆ LoadCellSize()

static int ConfigManager::LoadCellSize ( )
inlinestatic

Get the current size for each grid cell.

Returns
the width and height of each cell.

◆ LoadGravity()

static float ConfigManager::LoadGravity ( )
inlinestatic

Get the current gravity value.

Returns
the gravity value in pixels/frame^2.

◆ LoadPlayerSpeed()

static int ConfigManager::LoadPlayerSpeed ( )
inlinestatic

Get the current speed for the player.

Returns
the player speed in pixels/frame.

◆ LoadSpritePath()

static string ConfigManager::LoadSpritePath ( string sprite)
inlinestatic

Get the current sprite file path for the player.

Returns
the player's sprite file path.

◆ SetBounceHeight()

static void ConfigManager::SetBounceHeight ( float bounceHeight)
inlinestatic

Set a new bounce height.

Parameters
bounceHeightthe new bounce height.

◆ SetCellSize()

static void ConfigManager::SetCellSize ( int cellSize)
inlinestatic

Set a new size for each grid cell.

Parameters
cellSizethe new width and height of each cell.

◆ SetGravity()

static void ConfigManager::SetGravity ( float gravity)
inlinestatic

Set a new gravity value.

Parameters
gravitythe new gravity value in pixels/frame^2.

◆ SetPlayerSpeed()

static void ConfigManager::SetPlayerSpeed ( int playerSpeed)
inlinestatic

Set a new speed for the player.

Parameters
playerSpeedthe new speed in pixels/frame.

◆ SetSpritePath()

static void ConfigManager::SetSpritePath ( string sprite,
string path )
inlinestatic

Set a new sprite file path for the player.

Parameters
spritethe name of the sprite to update.
paththe new file path.

The documentation for this struct was generated from the following file: