mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-16 06:29:31 +00:00
Merge branch 'experimental' of file:///Users/User/code/coding/Aquaria_fg_clean into experimental
This commit is contained in:
commit
508fae3574
1 changed files with 22 additions and 0 deletions
|
@ -1235,6 +1235,26 @@ luaFunc(obj_isInternalVelIn)
|
||||||
luaReturnBool(r ? r->velocity.isLength2DIn(lua_tonumber(L, 2)) : false);
|
luaReturnBool(r ? r->velocity.isLength2DIn(lua_tonumber(L, 2)) : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
luaFunc(obj_setGravity)
|
||||||
|
{
|
||||||
|
RenderObject *r = robj(L);
|
||||||
|
if (r)
|
||||||
|
{
|
||||||
|
r->gravity.stop();
|
||||||
|
interpolateVec2(L, r->gravity, 2);
|
||||||
|
}
|
||||||
|
luaReturnNil();
|
||||||
|
}
|
||||||
|
|
||||||
|
luaFunc(obj_getGravity)
|
||||||
|
{
|
||||||
|
Vector v;
|
||||||
|
RenderObject *r = robj(L);
|
||||||
|
if (r)
|
||||||
|
v = r->gravity;
|
||||||
|
luaReturnVec2(v.x, v.y);
|
||||||
|
}
|
||||||
|
|
||||||
luaFunc(obj_getCollideRadius)
|
luaFunc(obj_getCollideRadius)
|
||||||
{
|
{
|
||||||
RenderObject *r = robj(L);
|
RenderObject *r = robj(L);
|
||||||
|
@ -1738,6 +1758,8 @@ luaFunc(quad_getBorderAlpha)
|
||||||
RO_FUNC(getter, prefix, addInternalVel ) \
|
RO_FUNC(getter, prefix, addInternalVel ) \
|
||||||
RO_FUNC(getter, prefix, isInternalVelIn) \
|
RO_FUNC(getter, prefix, isInternalVelIn) \
|
||||||
RO_FUNC(getter, prefix, getInternalVelLen) \
|
RO_FUNC(getter, prefix, getInternalVelLen) \
|
||||||
|
RO_FUNC(getter, prefix, setGravity ) \
|
||||||
|
RO_FUNC(getter, prefix, getGravity ) \
|
||||||
RO_FUNC(getter, prefix, getCollideRadius) \
|
RO_FUNC(getter, prefix, getCollideRadius) \
|
||||||
RO_FUNC(getter, prefix, setCollideRadius) \
|
RO_FUNC(getter, prefix, setCollideRadius) \
|
||||||
RO_FUNC(getter, prefix, getNormal ) \
|
RO_FUNC(getter, prefix, getNormal ) \
|
||||||
|
|
Loading…
Reference in a new issue