Game Engine 2D Platformer
Public Member Functions | List of all members
SoundComponent Class Reference

SoundComponent class used to manage sound effects for GameEntity. More...

#include <SoundComponent.hpp>

Inheritance diagram for SoundComponent:
Inheritance graph
[legend]
Collaboration diagram for SoundComponent:
Collaboration graph
[legend]

Public Member Functions

 SoundComponent ()
 Constuctor for SoundComponent. More...
 
 ~SoundComponent ()
 Destructor for SoundComponent. More...
 
void StartUp ()
 Initializes the attributes for SoundComponent. More...
 
void ShutDown ()
 Destroys and frees attributes for SoundComponent. More...
 
void Update (GameEntity &entity)
 Updates the SoundComponent. More...
 
void Render (GameEntity &entity)
 Renders the SoundComponent. More...
 
- Public Member Functions inherited from Component
 Component ()=default
 Constuctor for Component class. More...
 
virtual void LoadImage (std::string filepath, SDL_Renderer *ren)
 To initalize loadImages for children classes. More...
 
virtual void HandleEvent (GameEntity &entity)
 Handle the events of GameEntity object for children classes. More...
 

Detailed Description

SoundComponent class used to manage sound effects for GameEntity.

Constructor & Destructor Documentation

◆ SoundComponent()

SoundComponent::SoundComponent ( )

Constuctor for SoundComponent.

◆ ~SoundComponent()

SoundComponent::~SoundComponent ( )

Destructor for SoundComponent.

Member Function Documentation

◆ Render()

void SoundComponent::Render ( GameEntity entity)
virtual

Renders the SoundComponent.

Parameters
entityGameEntity Object

Reimplemented from Component.

◆ ShutDown()

void SoundComponent::ShutDown ( )
virtual

Destroys and frees attributes for SoundComponent.

Reimplemented from Component.

◆ StartUp()

void SoundComponent::StartUp ( )
virtual

Initializes the attributes for SoundComponent.

Reimplemented from Component.

◆ Update()

void SoundComponent::Update ( GameEntity entity)
virtual

Updates the SoundComponent.

Plays sound effect if the flag in GameEntity is set to true.

Parameters
entityGameEntity Object
GameEntity&entity

Implements Component.


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