00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "asSceneComponent.h"
00018
00019 #ifdef __COMPILE_WITH_ANGELSCRIPT__
00020
00021 #include "../../ScriptHelper.h"
00022
00023
00025 SceneComponent* createSceneComponent(Entity* parent)
00026 {
00027 return new SceneComponent(parent);
00028 }
00029
00031 void bindSceneComponent(asIScriptEngine *engine)
00032 {
00033
00034 int r;
00035
00036
00037 r = engine->RegisterObjectType("SceneComponent", sizeof(SceneComponent), asOBJ_REF); assert(r >= 0);
00038
00039
00040 bindSceneComponentBase<SceneComponent>(engine, "SceneComponent");
00041
00042
00043 r = engine->RegisterObjectBehaviour("SceneComponent", asBEHAVE_FACTORY, "SceneComponent@ f(Entity @+)",
00044 asFUNCTIONPR(createSceneComponent, (Entity*), SceneComponent*),
00045 asCALL_CDECL); assert(r >= 0);
00046
00047 r = engine->RegisterObjectMethod("SceneComponent", "SceneComponent& opAssign(const SceneComponent &in)",
00048 asFUNCTION(assignT<SceneComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0);
00049 }
00050
00051 #endif // __COMPILE_WITH_ANGELSCRIPT__
00052
00053