private void apply() { if (_world != null) { _world.SetGravity(new b2Vec2(gravity.x, gravity.y)); _world.SetAllowSleep(allowSleep); } }