mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-22 05:34:46 +00:00
39 lines
722 B
C++
39 lines
722 B
C++
#include "soundEmitterObject.h"
|
|
|
|
IMPLEMENT_CO_NETOBJECT_V1(SoundEmitterObject);
|
|
|
|
SoundEmitterObject::SoundEmitterObject()
|
|
: mSoundComponent(nullptr)
|
|
{
|
|
mSuperClassName = StringTable->insert("Entity");
|
|
}
|
|
SoundEmitterObject::~SoundEmitterObject()
|
|
{
|
|
|
|
}
|
|
|
|
bool SoundEmitterObject::onAdd()
|
|
{
|
|
if (!Parent::onAdd())
|
|
return false;
|
|
|
|
//Sound
|
|
mSoundComponent = new SoundComponent();
|
|
if (!mSoundComponent->registerObject())
|
|
{
|
|
Con::errorf("SoundEmitterObject::onAdd - unable to add soundComponent!");
|
|
return false;
|
|
}
|
|
|
|
mSoundComponent->setInternalName("soundComponent");
|
|
|
|
addComponent(mSoundComponent);
|
|
|
|
return true;
|
|
}
|
|
|
|
void SoundEmitterObject::onRemove()
|
|
{
|
|
Parent::onRemove();
|
|
}
|