mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Expose SimPersistID to EngineAPI
This commit is contained in:
parent
fe09d6e125
commit
e95a5bf139
2 changed files with 39 additions and 12 deletions
|
|
@ -24,16 +24,26 @@
|
|||
#include "console/simObject.h"
|
||||
#include "core/util/tDictionary.h"
|
||||
#include "core/util/safeDelete.h"
|
||||
#include "engineAPI.h"
|
||||
|
||||
|
||||
//#define DEBUG_SPEW
|
||||
|
||||
IMPLEMENT_CLASS(SimPersistID, "")
|
||||
END_IMPLEMENT_CLASS;
|
||||
|
||||
SimPersistID::LookupTableType* SimPersistID::smLookupTable;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
SimPersistID::SimPersistID()
|
||||
{
|
||||
mObject = NULL;
|
||||
mUUID.generate();
|
||||
smLookupTable->insertUnique(mUUID, this);
|
||||
}
|
||||
|
||||
SimPersistID::SimPersistID( SimObject* object )
|
||||
: mObject( object )
|
||||
{
|
||||
|
|
@ -136,3 +146,13 @@ SimPersistID* SimPersistID::findOrCreate( const Torque::UUID& uuid )
|
|||
|
||||
return pid;
|
||||
}
|
||||
|
||||
DefineNewEngineMethod(SimPersistID, getUUID, Torque::UUID, (), , "")
|
||||
{
|
||||
return object->getUUID();
|
||||
}
|
||||
|
||||
DefineNewEngineMethod(SimPersistID, getObject, SimObject*, (), , "")
|
||||
{
|
||||
return object->getObject();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue