[Updated] Codebase to deal with wasm-style keyboard and mouse inputs
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#ifndef AUDIO_SERVICE_H
|
||||
#define AUDIO_SERVICE_H
|
||||
|
||||
#include "raylib.h"
|
||||
#include "enums/EMusic.h"
|
||||
#include "services/Service.h"
|
||||
#include <optional>
|
||||
|
||||
class AudioService : public Service<AudioService>
|
||||
{
|
||||
public:
|
||||
void setMusic(EMusic music);
|
||||
std::optional<Music> getMusic(){return music;}
|
||||
EMusic getCurrentTrack(){return currentTrack;}
|
||||
void playMusic();
|
||||
void pauseMusic();
|
||||
void stopMusic();
|
||||
|
||||
void playSound();
|
||||
void stopSounds();
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
std::optional<Music> music;
|
||||
EMusic currentTrack = EMusic::NONE;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user