Added a system that will handle BGM. Created specific logic for sounds to loop like Petter wants.

This commit is contained in:
stiffly
2016-02-24 11:51:06 +01:00
parent 2c18068059
commit f72dea3852
4 changed files with 98 additions and 23 deletions
@@ -0,0 +1,21 @@
#ifndef Systems_BackgroundMusicSystem_h__
#define Systems_BackgroundMusicSystem_h__
#include "../Engine/Core/System.h"
#include "../Engine/Core/EventBroker.h"
// Handles transitions between BGM's depending on the current state of the game.
class BackgroundMusicSystem : public PureSystem
{
public:
BackgroundMusicSystem(SystemParams params);
~BackgroundMusicSystem();
void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cEmitter, double dt) override;
private:
void mainMenuLoop();
const std::string menu = "Audio/crosscounter.wav";
};
#endif // ifndef