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

@@ -249,7 +249,7 @@ public:
FUNC2(body_set_omit_force_integration, RID, bool);
FUNC1RC(bool, body_is_omitting_force_integration, RID);
FUNC3(body_set_state_sync_callback, RID, void *, BodyStateCallback);
FUNC2(body_set_state_sync_callback, RID, const Callable &);
FUNC3(body_set_force_integration_callback, RID, const Callable &, const Variant &);
bool body_collide_shape(RID p_body, int p_body_shape, RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, Vector2 *r_results, int p_result_max, int &r_result_count) override {