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:
Areloch 2019-03-04 21:44:00 -06:00
parent 775ca57047
commit 23182eb2a1
23 changed files with 792 additions and 35 deletions

View 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();
}