1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-12-25 14:15:46 +00:00

Add 2 Lua functions:

+ obj_getWorldScale()
+ obj_getParent()
This commit is contained in:
fgenesis 2013-10-21 02:34:57 +02:00
parent b0c098bbcd
commit fa6ca8d60a

View file

@ -1535,6 +1535,21 @@ luaFunc(obj_fadeAlphaWithLife)
luaReturnNil();
}
luaFunc(obj_getWorldScale)
{
RenderObject *r = robj(L);
Vector s;
if (r)
s = r->getRealScale();
luaReturnVec2(s.x, s.y);
}
luaFunc(obj_getParent)
{
RenderObject *r = robj(L);
luaReturnPtr(r ? r->getParent() : NULL);
}
// ----- end RenderObject common functions -----
@ -1746,6 +1761,8 @@ luaFunc(quad_getBorderAlpha)
RO_FUNC(getter, prefix, collideCircleVsLineAngle) \
RO_FUNC(getter, prefix, getVectorToObj ) \
RO_FUNC(getter, prefix, fadeAlphaWithLife ) \
RO_FUNC(getter, prefix, getWorldScale ) \
RO_FUNC(getter, prefix, getParent ) \
MK_ALIAS(prefix, fh, flipHorizontal ) \
MK_ALIAS(prefix, fv, flipVertical )