mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Added Body/Contact/Fixture/Joint/World:isDestroyed (resolves issue #964.)
This commit is contained in:
@@ -262,6 +262,13 @@ int w_Fixture_destroy(lua_State *L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int w_Fixture_isDestroyed(lua_State *L)
|
||||
{
|
||||
Fixture *f = luax_checktype<Fixture>(L, 1, "Fixture", PHYSICS_FIXTURE_T);
|
||||
luax_pushboolean(L, !f->isValid());
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const luaL_Reg functions[] =
|
||||
{
|
||||
{ "getType", w_Fixture_getType },
|
||||
@@ -290,6 +297,7 @@ static const luaL_Reg functions[] =
|
||||
{ "getGroupIndex", w_Fixture_getGroupIndex },
|
||||
{ "setGroupIndex", w_Fixture_setGroupIndex },
|
||||
{ "destroy", w_Fixture_destroy },
|
||||
{ "isDestroyed", w_Fixture_isDestroyed },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user