PhysicsServer2D and PhysicsServer3D: make body_set_state_sync_callback take a Callable

Prefer Callable to a C-style callback. This is helpful for GDExtension.
This commit is contained in:
Ricardo Buring
2022-09-15 14:15:39 +02:00
parent 4ba934bf3d
commit ff4e72a0bc
21 changed files with 47 additions and 101 deletions

View File

@@ -280,7 +280,7 @@ void PhysicsServer2DExtension::_bind_methods() {
GDVIRTUAL_BIND(_body_set_omit_force_integration, "body", "enable");
GDVIRTUAL_BIND(_body_is_omitting_force_integration, "body");
GDVIRTUAL_BIND(_body_set_state_sync_callback, "body", "callback");
GDVIRTUAL_BIND(_body_set_state_sync_callback, "body", "callable");
GDVIRTUAL_BIND(_body_set_force_integration_callback, "body", "callable", "userdata");
GDVIRTUAL_BIND(_body_collide_shape, "body", "body_shape", "shape", "shape_xform", "motion", "results", "result_max", "result_count");