Bound Meshes to Scripts

This commit is contained in:
Sachith Hasaranga Seneviratne
2014-06-14 14:11:19 +05:30
parent 7d63813afd
commit f29ed1c2a3
2 changed files with 6 additions and 0 deletions

View File

@@ -90,6 +90,10 @@ namespace Scripting
r = engine->RegisterObjectMethod("TrackObject", "PhysicalObject @getPhysicalObject()", asMETHOD(TrackObject, getPhysicalObjectForScript), asCALL_THISCALL); assert(r >= 0);
r = engine->RegisterObjectMethod("PhysicalObject", "bool isFlattener()", asMETHOD(PhysicalObject, isFlattenKartObject), asCALL_THISCALL); assert(r >= 0);
r = engine->RegisterObjectMethod("PhysicalObject", "void disable()", asFUNCTION(disable), asCALL_CDECL_OBJLAST); assert(r >= 0);
r = engine->RegisterObjectType("Mesh", 0, asOBJ_REF | asOBJ_NOCOUNT); assert(r >= 0);
r = engine->RegisterObjectMethod("Mesh", "getMesh @getMesh()", asMETHOD(TrackObject, getMesh), asCALL_THISCALL); assert(r >= 0);
}

View File

@@ -142,6 +142,8 @@ public:
template<typename T>
const T* getPresentation() const { return dynamic_cast<T*>(m_presentation); }
TrackObjectPresentationMesh* getMesh(){ return getPresentation<TrackObjectPresentationMesh>(); }
ThreeDAnimation* getAnimator() { return m_animator; }
const ThreeDAnimation* getAnimator() const { return m_animator; }