mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Adds some in-progress gameObject recreation of various legacy game classes, such as PlayerObject, AIPlayerObject, Sound Emitter and Static Shape.
This commit is contained in:
parent
775ca57047
commit
23182eb2a1
23 changed files with 792 additions and 35 deletions
38
Engine/source/T3D/gameObjects/soundEmitterObject.cpp
Normal file
38
Engine/source/T3D/gameObjects/soundEmitterObject.cpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#include "SoundEmitterObject.h"
|
||||
|
||||
IMPLEMENT_CO_NETOBJECT_V1(SoundEmitterObject);
|
||||
|
||||
SoundEmitterObject::SoundEmitterObject()
|
||||
: mSoundComponent(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue