Asset Manager.
More...
#include <AssetManager.h>
|
| void | load (SDL_Renderer *renderer) |
| | Load assets.
|
| |
| std::shared_ptr< TTF_Font > | getFont () const |
| | Get font at its default loaded point size.
|
| |
| std::shared_ptr< TTF_Font > | getFont (int pointSize) const |
| | Open the same font file at a specific point size.
|
| |
| std::shared_ptr< SDL_Texture > | getTexture (Texture texture) |
| | Get textures.
|
| |
| std::shared_ptr< Mix_Music > | getMusic (MusicEnum music) |
| | Get music.
|
| |
| std::shared_ptr< Mix_Chunk > | getSound (SoundEnum sound) |
| | Get sound.
|
| |
◆ getFont() [1/2]
| std::shared_ptr< TTF_Font > bomberman::AssetManager::getFont |
( |
| ) |
const |
Get font at its default loaded point size.
- Returns
- std::shared_ptr<TTF_Font> - loaded font
◆ getFont() [2/2]
| std::shared_ptr< TTF_Font > bomberman::AssetManager::getFont |
( |
int |
pointSize | ) |
const |
Open the same font file at a specific point size.
The caller owns the returned instance; it is not cached.
- Parameters
-
| pointSize | Desired point size. |
- Returns
- std::shared_ptr<TTF_Font> or nullptr on failure.
◆ getMusic()
| std::shared_ptr< Mix_Music > bomberman::AssetManager::getMusic |
( |
MusicEnum |
music | ) |
|
Get music.
- Parameters
-
- Returns
- std::shared_ptr<Mix_Music> - loaded music
◆ getSound()
| std::shared_ptr< Mix_Chunk > bomberman::AssetManager::getSound |
( |
SoundEnum |
sound | ) |
|
Get sound.
- Parameters
-
- Returns
- std::shared_ptr<Mix_Chunk> - loaded sound
◆ getTexture()
| std::shared_ptr< SDL_Texture > bomberman::AssetManager::getTexture |
( |
Texture |
texture | ) |
|
Get textures.
- Parameters
-
| texture | - texture enumerator |
- Returns
- std::shared_ptr<SDL_Texture> - loaded texture
◆ load()
| void bomberman::AssetManager::load |
( |
SDL_Renderer * |
renderer | ) |
|
The documentation for this class was generated from the following files: