* Add onCollisionEnd for HitboxShape and Collidable
* Add tests for collision callbacks
* Detect multiple collsions with same collidable in test
* Remove unused import
* Break out duplicated code
* Fix formatting
* Use correct hash set
* Update examples/lib/stories/collision_detection/multiple_shapes.dart
Co-authored-by: Erick <erickzanardoo@gmail.com>
* Update examples/lib/stories/collision_detection/multiple_shapes.dart
Co-authored-by: Erick <erickzanardoo@gmail.com>
* Use hashValues instead of _combineHashCodes
* hashValues is order dependent so we need to sort the objects first
* Add section about onCollisionEnd
* Fix missed hashValues
* Use xor instead of hashValues
* Update examples/lib/stories/collision_detection/collision_detection.dart
Co-authored-by: Luan Nico <luanpotter27@gmail.com>
Co-authored-by: Erick <erickzanardoo@gmail.com>
Co-authored-by: Luan Nico <luanpotter27@gmail.com>
* Fix collision detection with anchor other than center
* Fix rotation around anchor
* Simplify advanced collision detection example
* Add some tests
* Simplify multiple shapes example more
* Move shapeCenter logic into Shape
* Render center point
* More debugging in MultipleShapes
* Wtf.
* Re-add "possibly" calculation
* Rotate shape around parent center
* Only consider the parent center
* Format multiple shapes example
* Add simple shapes example
* Add caching in polygon
* Fix rendering of polygon shapes
* Remove print
* Add changelog entry
* Fix analyze complaints
* Remove all shapes that contain the pressed point
* Take zoom into consideration in multiple shapes example
* Remove useless import
* map instead of generate
* Fix position component test
* Simpler negative vector2
* "Correct" format
* Add ShapeComponent instead of camera aware shapes
* Fix formatting
* Remove zoom from collision detection example
* No need for gameRef in MultipleShapes example
* Fix naming in only_shapes
* Making velocities and deltas have the game and global values
* Re adding code metircs
* Re adding code metircs
* Update packages/flame/lib/src/gestures/events.dart
Co-authored-by: Luan Nico <luanpotter27@gmail.com>
* Renaming example variable
* fixing example
* Linting
Co-authored-by: Luan Nico <luanpotter27@gmail.com>
* No setter for position and size
* Use setter for position and size
* Add onPositionUpdate and snapTo to Camera
* Fix formatting
* Fix size in test
* Update packages/flame/CHANGELOG.md
Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
* Update packages/flame/CHANGELOG.md
Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
* Better naming for internal position state
* Anchor and angle defaults on effect test utils
* No setter for position and size
* Fix scale effect
* Fix formatting
Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
Co-authored-by: Erick Zanardo <erickzanardoo@gmail.com>
* Transforming PaletteEntry#paint into a full method
* Fixing some errors that went unoticed
* Update packages/flame/CHANGELOG.md
Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
* Update packages/flame/CHANGELOG.md
Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
* followup
* format
Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>