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

36 lines
887 B
C++

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