Ported services and sound, now just GUI left
This commit is contained in:
@@ -11,7 +11,7 @@ using namespace B3D;
|
||||
//#include "GuiRootInstance.h"
|
||||
//#include "ThumbnailGeneratorInstance.h"
|
||||
#include "XplicitNgine/XplicitNgine.h"
|
||||
//#include "SoundService.h"
|
||||
#include "SoundService.h"
|
||||
#include "LightingInstance.h"
|
||||
|
||||
// Libraries
|
||||
@@ -32,7 +32,7 @@ namespace B3D {
|
||||
LevelInstance* getLevel();
|
||||
XplicitNgine* getEngine();
|
||||
// ThumbnailGeneratorInstance* getThumbnailGenerator();
|
||||
// SoundService* getSoundService();
|
||||
SoundService* getSoundService();
|
||||
LightingInstance* getLighting();
|
||||
|
||||
std::string message;
|
||||
@@ -55,7 +55,7 @@ namespace B3D {
|
||||
SelectionService* selectionService;
|
||||
// ThumbnailGeneratorInstance* thumbnailGenerator;
|
||||
XplicitNgine* xplicitNgine;
|
||||
// SoundService* soundService;
|
||||
SoundService* soundService;
|
||||
LightingInstance* lightingInstance;
|
||||
bool running;
|
||||
|
||||
|
||||
30
src/include/DataModelV3/SoundInstance.h
Normal file
30
src/include/DataModelV3/SoundInstance.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
#include "Instance.h"
|
||||
namespace B3D{
|
||||
class SoundInstance : public Instance
|
||||
{
|
||||
public:
|
||||
SoundInstance(void);
|
||||
~SoundInstance(void);
|
||||
|
||||
// Getters
|
||||
float getSoundVolume();
|
||||
std::string getSoundId();
|
||||
bool isPlayedOnRemove();
|
||||
bool isLooped();
|
||||
|
||||
// Setters
|
||||
void setSoundVolume(float newVolume);
|
||||
void setSoundId(std::string newSoundId);
|
||||
void setIsPlayedOnRemove(bool isPlayed);
|
||||
void setIsLooped(bool isLooped);
|
||||
|
||||
// Functions
|
||||
void play();
|
||||
private:
|
||||
float soundVolume;
|
||||
std::string soundId;
|
||||
bool playOnRemove;
|
||||
bool looped;
|
||||
};
|
||||
}
|
||||
17
src/include/DataModelV3/SoundService.h
Normal file
17
src/include/DataModelV3/SoundService.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include "Instance.h"
|
||||
#include "SoundInstance.h"
|
||||
namespace B3D
|
||||
{
|
||||
class SoundService : public Instance
|
||||
{
|
||||
public:
|
||||
SoundService(void);
|
||||
~SoundService(void);
|
||||
|
||||
float getMusicVolume();
|
||||
void playSound(Instance* sound);
|
||||
private:
|
||||
float musicVolume;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user