JD2022-TU1/main/extern/Soundwich/Solution/Engine/Src/Components/JustDance/StopAllEventBusMixes.cpp

36 lines
905 B
C++

#include "StopAllEventBusMixes.h"
Util::DynamicArray< Soundwich::IJustDanceStopAllEventBusMixesCallback* > Soundwich::StopAllEventBusMixes::m_callbacks;
bool Soundwich::StopAllEventBusMixes::Init()
{
return true;
}
Soundwich::StopAllEventBusMixes::~StopAllEventBusMixes()
{
}
void Soundwich::StopAllEventBusMixes::PushEventIn(uint32 index, Component* from)
{
ExecuteCallbacks();
}
void Soundwich::StopAllEventBusMixes::RegisterCallback(IJustDanceStopAllEventBusMixesCallback* cb)
{
m_callbacks.PushBack(cb);
}
void Soundwich::StopAllEventBusMixes::UnregisterCallback(IJustDanceStopAllEventBusMixesCallback* cb)
{
m_callbacks.Remove(cb);
}
void Soundwich::StopAllEventBusMixes::ExecuteCallbacks()
{
for (uint32 count = 0; count < m_callbacks.Size(); ++count)
{
m_callbacks[count]->OnStopAllEventBusMixes(_data.IncludeMainBusMix, _data.FadeDurationOverride);
}
}