Game Engine 2D Platformer
SoundComponent.hpp
Go to the documentation of this file.
1 /*
2  * @file SoundComponent.hpp
3  * @brief SoundComponent class interface
4  * @date 2021-03-12
5  ***********************************************/
6 #ifndef SOUNDCOMPONENT_HPP
7 #define SOUNDCOMPONENT_HPP
8 
9 #include <SDL2/SDL.h>
10 #include "Component.hpp"
11 #include "ResourceManager.hpp"
12 
15 class SoundComponent : public Component
16 {
17 public:
28  void StartUp();
31  void ShutDown();
35  void Update(GameEntity& entity);
39  void Render(GameEntity &entity);
40 
41 private:
42  //Create a ResourceManager instance
44 };
45 
46 #endif
The interface class for different components to inherit.
Definition: Component.hpp:16
Represents an interactable entity in the game that includes Main Character, NPC, Tiles ,...
Definition: GameEntity.hpp:22
The resource manager is responsible for handling and managing resources regarding the game.
Definition: ResourceManager.hpp:23
static ResourceManager & getInstance()
Method used to get instance of ResourceManager class.
Definition: ResourceManager.cpp:8
SoundComponent class used to manage sound effects for GameEntity.
Definition: SoundComponent.hpp:16
void StartUp()
Initializes the attributes for SoundComponent.
Definition: SoundComponent.cpp:11
void Render(GameEntity &entity)
Renders the SoundComponent.
Definition: SoundComponent.cpp:18
void ShutDown()
Destroys and frees attributes for SoundComponent.
Definition: SoundComponent.cpp:15
void Update(GameEntity &entity)
Updates the SoundComponent.
Definition: SoundComponent.cpp:25
SoundComponent()
Constuctor for SoundComponent.
Definition: SoundComponent.cpp:3
~SoundComponent()
Destructor for SoundComponent.
Definition: SoundComponent.cpp:7