mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-12-26 06:35:51 +00:00
Add 2 Lua functions:
+ obj_getWorldScale() + obj_getParent()
This commit is contained in:
parent
b0c098bbcd
commit
fa6ca8d60a
1 changed files with 17 additions and 0 deletions
|
@ -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 )
|
||||
|
||||
|
|
Loading…
Reference in a new issue