Class for managing assets.
More...
#include <AssetManager.hpp>
|
std::map< std::string, sf::Texture > | _textures |
| map for storing Textures More...
|
|
std::map< std::string, sf::Font > | _fonts |
| map for storing Fonts More...
|
|
std::map< std::string, sf::SoundBuffer > | _sound_clips |
| map for storing Sound clips/Sound effects More...
|
|
Class for managing assets.
Assets managed by this class include Textures, Fonts and Sound.
◆ AssetManager()
HeadBall::AssetManager::AssetManager |
( |
| ) |
|
|
inline |
Construct a new Asset Manager object.
◆ ~AssetManager()
HeadBall::AssetManager::~AssetManager |
( |
| ) |
|
|
inline |
Destroy the Asset Manager object.
◆ getFont()
sf::Font & HeadBall::AssetManager::getFont |
( |
std::string |
name | ) |
|
Get the Font object.
- Parameters
-
- Returns
- sf::Font& Reference to Font object
◆ getSound()
sf::SoundBuffer & HeadBall::AssetManager::getSound |
( |
std::string |
name | ) |
|
Get the Sound object.
- Parameters
-
- Returns
- sf::SoundBuffer& Reference to Sound object
◆ getTexture()
sf::Texture & HeadBall::AssetManager::getTexture |
( |
std::string |
name | ) |
|
Get the Texture object.
- Parameters
-
name | Name of Texture object |
- Returns
- sf::Texture& Reference to Texture object
◆ isFontPresent()
bool HeadBall::AssetManager::isFontPresent |
( |
std::string |
fontName | ) |
|
Check whether the Font is present in map
- Parameters
-
fontName | Name of Font object |
- Returns
- true if Font is present
-
false if Font is not present
◆ isSoundPresent()
bool HeadBall::AssetManager::isSoundPresent |
( |
std::string |
soundName | ) |
|
Check whether the Sound is present in map
- Parameters
-
soundName | Name of Sound object |
- Returns
- true if Sound is present
-
false if Sound is not present
◆ isTexturePresent()
bool HeadBall::AssetManager::isTexturePresent |
( |
std::string |
textureName | ) |
|
Check whether the Texture is present in map
- Parameters
-
textureName | Name of Texture object |
- Returns
- true if Texture is present
-
false if Texture is not present
◆ loadFont()
void HeadBall::AssetManager::loadFont |
( |
std::string |
name, |
|
|
std::string |
fileName |
|
) |
| |
Load Font from given file into map
- Parameters
-
name | Name of the Font object |
fileName | Path to Font |
◆ loadSound()
void HeadBall::AssetManager::loadSound |
( |
std::string |
name, |
|
|
std::string |
fileName |
|
) |
| |
Load Sound from given file into map
- Parameters
-
name | Name of Sound object |
fileName | Path to Sound |
◆ loadTexture()
void HeadBall::AssetManager::loadTexture |
( |
std::string |
name, |
|
|
std::string |
fileName |
|
) |
| |
Load Texture from given file into map
- Parameters
-
name | Name of Texture object |
fileName | Path to Texture |
◆ _fonts
std::map<std::string, sf::Font> HeadBall::AssetManager::_fonts |
|
private |
◆ _sound_clips
std::map<std::string, sf::SoundBuffer> HeadBall::AssetManager::_sound_clips |
|
private |
map
for storing Sound clips/Sound effects
◆ _textures
std::map<std::string, sf::Texture> HeadBall::AssetManager::_textures |
|
private |
The documentation for this class was generated from the following files: