Merge pull request #73 from SHADE-DP/SP3-129-AudioSystem
added audiosystem back in
This commit is contained in:
commit
f2b27b35fc
|
@ -25,7 +25,7 @@
|
|||
#include "Math/Transform/SHTransformSystem.h"
|
||||
#include "Input/SHInputManagerSystem.h"
|
||||
#include "FRC/SHFramerateController.h"
|
||||
//#include "AudioSystem/SHAudioSystem.h"
|
||||
#include "AudioSystem/SHAudioSystem.h"
|
||||
|
||||
#include "Scenes/SBTestScene.h"
|
||||
#include "Math/Transform/SHTransformComponent.h"
|
||||
|
@ -59,7 +59,7 @@ namespace Sandbox
|
|||
SHADE::SHSystemManager::CreateSystem<SHADE::SHTransformSystem>();
|
||||
SHADE::SHGraphicsSystem* graphicsSystem = static_cast<SHADE::SHGraphicsSystem*>(SHADE::SHSystemManager::GetSystem<SHADE::SHGraphicsSystem>());
|
||||
SHADE::SHSystemManager::CreateSystem<SHADE::SHInputManagerSystem>();
|
||||
//SHADE::SHSystemManager::CreateSystem<SHADE::SHAudioSystem>();
|
||||
SHADE::SHSystemManager::CreateSystem<SHADE::SHAudioSystem>();
|
||||
|
||||
// Create Routines
|
||||
SHADE::SHSystemManager::RegisterRoutine<SHADE::SHScriptEngine, SHADE::SHScriptEngine::FrameSetUpRoutine>();
|
||||
|
@ -95,7 +95,7 @@ namespace Sandbox
|
|||
auto id2 = SHFamilyID<SHSystem>::GetID<SHGraphicsSystem>();
|
||||
auto id3 = SHFamilyID<SHSystem>::GetID<SHGraphicsSystem>();
|
||||
|
||||
//SHADE::SHSystemManager::RegisterRoutine<SHADE::SHAudioSystem, SHADE::SHAudioSystem::AudioRoutine>();
|
||||
SHADE::SHSystemManager::RegisterRoutine<SHADE::SHAudioSystem, SHADE::SHAudioSystem::AudioRoutine>();
|
||||
|
||||
// Set up graphics system and windows
|
||||
graphicsSystem->SetWindow(&window);
|
||||
|
|
|
@ -93,8 +93,8 @@ namespace SHADE
|
|||
void SHADE::SHAudioSystem::Run(float dt)
|
||||
{
|
||||
static_cast<void>(dt);
|
||||
if (GetKeyState(VK_SPACE) & 0x8000)
|
||||
PlayEventOnce("event:/Characters/sfx_footsteps_raccoon");
|
||||
//if (GetKeyState(VK_SPACE) & 0x8000)
|
||||
// PlayEventOnce("event:/Characters/sfx_footsteps_raccoon");
|
||||
|
||||
fmodStudioSystem->update();
|
||||
if (!denseListener->empty())
|
||||
|
|
|
@ -45,6 +45,12 @@ namespace SHADE
|
|||
SHEditorWindow::Update();
|
||||
if (Begin())
|
||||
{
|
||||
if (ImGui::Button("AUDIO"))
|
||||
{
|
||||
auto audioSystem = SHSystemManager::GetSystem<SHADE::SHAudioSystem>();
|
||||
audioSystem->PlayEventOnce("event:/Characters/sfx_footsteps_raccoon");
|
||||
}
|
||||
|
||||
if (!SHEditor::selectedEntities.empty())
|
||||
{
|
||||
EntityID const& eid = SHEditor::selectedEntities[0];
|
||||
|
|
Loading…
Reference in New Issue