Commit Graph

7 Commits

Author SHA1 Message Date
Alejandro Santiago
a50d4a1e7d feat!: enhance ContactCallback process (#1547)
Migration notes

The entire contact callback process has been redefined to mimic Flame's CollisionCallbacks.

In order to simplify the migration to this new code, the following steps should facilitate doing so:

    Remove lines of code that used addContactCallback, removeContactCallback, clearContactCallback.
    Remove subclasses of ContactCallbacks<Type1, Type2>.
    2.1. Include with ContactCallback in your BodyComponent class signature.
    2.2. Override the contact method that you are interested in, and check that other is Type2, then perform the logic.

The above is just a suggested migration approach. There are other code alternatives or patterns you might want to follow. In addition, you can define your own custom contact logic by providing a ContactListener to your Forge2DGame.

For more information check the examples, Flame documentation, or the class documentation of ContactCallbacks and WorldContactListener.
2022-04-22 13:04:10 +00:00
Lukas Klingsbo
bdb360f181 feat!: Flip gravity in flame_forge2d to be able to mix Forge2D and Flame components (#1506) 2022-04-10 12:41:02 +00:00
Pasha Stetsenko
45f7929556 fix: Fix warnings in documentation (#1472) 2022-03-20 12:15:58 +01:00
Lukas Klingsbo
7fe8b6deb1 feat: BodyComponent can properly have normal Flame component children (#1442) 2022-03-13 15:04:54 +01:00
Lukas Klingsbo
29dd09ca92 feat(collision detection)!: Use a broadphase to make collision detection more efficient (#1252) 2022-03-07 09:08:32 +01:00
Munsterlander
a037ada5ea feat: Added getImageLayer to flame_tiled (#1405) 2022-02-27 16:53:44 +00:00
Pasha Stetsenko
12cf8f7096 docs: Upgrade documentation site (#1365) 2022-02-13 07:50:13 +01:00