00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "asBillboardComponent.h"
00018
00019 #ifdef __COMPILE_WITH_ANGELSCRIPT__
00020
00021 #include "../../ScriptHelper.h"
00022
00023
00025 BillboardComponent* createBillboardComponent(Entity *parent)
00026 {
00027 return new BillboardComponent(parent);
00028 }
00029
00031 BillboardComponent* createBillboardComponent(Entity *parent, const dimension2df &size,
00032 const SColor &colorTop, const SColor &colorBottom)
00033 {
00034 return new BillboardComponent(parent, size, colorTop, colorBottom);
00035 }
00036
00038 void bindBillboardComponent(asIScriptEngine *engine)
00039 {
00040
00041 int r;
00042
00043
00044 r = engine->RegisterObjectType("BillboardComponent", sizeof(BillboardComponent), asOBJ_REF); assert(r >= 0);
00045
00046
00047 bindBillboardComponentBase<BillboardComponent>(engine, "BillboardComponent");
00048
00049
00050 r = engine->RegisterObjectBehaviour("BillboardComponent", asBEHAVE_FACTORY, "BillboardComponent@ f(Entity @+)",
00051 asFUNCTIONPR(createBillboardComponent, (Entity*), BillboardComponent*),
00052 asCALL_CDECL); assert(r >= 0);
00053 r = engine->RegisterObjectBehaviour("BillboardComponent", asBEHAVE_FACTORY, "BillboardComponent@ f(Entity @+, " \
00054 "const dimension2df &in, const SColor &in, const SColor &in)",
00055 asFUNCTIONPR(createBillboardComponent, (Entity*, const dimension2df&,
00056 const SColor&, const SColor&), BillboardComponent*),
00057 asCALL_CDECL); assert(r >= 0);
00058
00059 r = engine->RegisterObjectMethod("BillboardComponent", "BillboardComponent& opAssign(const BillboardComponent &in)",
00060 asFUNCTION(assignT<BillboardComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0);
00061 }
00062
00063 #endif // __COMPILE_WITH_ANGELSCRIPT__
00064
00065