16 Commits

Author SHA1 Message Date
3faf114994 feat!: HasDraggableComponents mixin is no longer needed (#2312)
This PR is first in a series of refactors that aim to simplify event handling in Flame. The approach is as follows:

    Added class GestureDetectorBuilder, which encapsulates the logic of applyGestureDetectors() in a class. This class resides within the Game and initiates widget rebuild whenever any new gesture detectors are added or removed. Note: 

    [idea] Convert HasTappableComponents/HasDraggableComponents into classes #1733 suggests having a list of interfaces inside the Game class -- this is essentially that list, encapsulated in a class.
    Added the MultiDragDispatcher component, which contains the logic that used to be within the HasDraggableComponents mixin. This component is internal; it mounts to a FlameGame directly, and ensures that it is a singleton.
    Whenever any DragCallbacks component is added to a game, it automatically adds the MultiDragDispatcher component (unless there is already one), which in turn registers a drag gesture detector with GestureDetectorBuilder and rebuilds the game widget.

The end result is that now in order to make a component draggable you only need to add the DragCallbacks mixin to that component, everything else will be handled by the framework.

Consequently, the HasDraggableComponents mixin is now empty and marked as deprecated.
2023-02-05 13:09:58 +00:00
7662118d14 chore(release): Publish flame_lint 0.2.0 (#2301)
- flame_lint@0.2.0
2023-01-28 00:44:29 +00:00
ce7f1110b5 chore(release): Publish packages (#2275)
- flame@1.6.0
 - flame_forge2d@0.12.5
 - flame_jenny@1.0.0
 - flame_rive@1.6.0
 - jenny@1.0.0
 - flame_oxygen@0.1.8
 - flame_bloc@1.8.2
 - flame_isolate@0.2.0
 - flame_lottie@0.2.0
 - flame_test@1.9.2
 - flame_tiled@1.9.1
 - flame_audio@1.3.5
 - flame_flare@1.5.2
 - flame_svg@1.7.1
 - flame_fire_atlas@1.3.3
2023-01-14 19:59:42 +01:00
b003372a74 chore(release): Publish Flame v1.5.0 (and all bridge packages) (#2197)
* chore(release): publish packages

 - flame@1.5.0
 - flame_bloc@1.8.1
 - flame_forge2d@0.12.4
 - flame_lottie@0.1.1
 - flame_rive@1.5.3
 - flame_svg@1.7.0
 - flame_test@1.9.0
 - flame_tiled@1.9.0
 - flame_isolate@0.1.1
 - flame_audio@1.3.3
 - flame_flare@1.5.1
 - flame_oxygen@0.1.7
 - flame_fire_atlas@1.3.2

* Depend on version of test
2022-11-27 19:22:37 -03:00
2a3b8998bf docs: Space Shooter Tutorial Migrated (#2135)
As discussed previously, this PR moves the Space Shooter Tutorial to the tutorials folder for direct inclusion in the docs. A few things to note, other than basic grammar and formatting, nothing was changed other than migrating the information to the current tutorial format. This should allow the tutorials.flame-engine.org subdomain to be deleted.

Note: Upon moving this tutorial, I discovered it is incomplete and missing the majority of the game.

Also, I realized that I left the android folder and some files that weren't necessary for the platform tutorial and have deleted those.
2022-11-04 13:26:24 +01:00
3b056c57c5 chore(release): publish packages
- flame@1.4.0
 - flame_test@1.8.0
 - flame_oxygen@0.1.6
 - flame_bloc@1.8.0
 - flame_flare@1.5.0
 - flame_forge2d@0.12.3
 - flame_lint@0.1.3
 - flame_svg@1.6.0
 - flame_tiled@1.8.0
 - flame_rive@1.5.2
 - flame_audio@1.3.2
 - flame_fire_atlas@1.3.1
2022-10-01 15:22:41 +02:00
b96432d002 chore(release): publish packages (#1852) 2022-08-19 23:22:21 +02:00
c7c4480d79 chore(release): publish packages (#1789)
* chore(release): publish packages

 - flame@1.2.1
 - flame_audio@1.3.0
 - flame_test@1.6.0
 - flame_bloc@1.6.0
 - flame_fire_atlas@1.2.0
 - flame_flare@1.3.0
 - flame_forge2d@0.12.1
 - flame_lint@0.1.1
 - flame_oxygen@0.1.4
 - flame_rive@1.5.0
 - flame_svg@1.4.0
 - flame_tiled@1.6.0

* Update packages/flame/CHANGELOG.md
2022-07-08 13:41:14 +02:00
02d0b71b23 docs: Klondike tutorial, part 4 (#1740)
This PR adds step 4 for the Klondike tutorial: "Gameplay".
2022-06-27 20:31:23 +00:00
2a41d0d683 feat: Move to Flutter 3.0.0 and Dart 2.17.0 (#1713)
This upgrades all packages to Flutter 3.0.0 and fixes all analyze issues that came from that.
2022-06-08 06:04:40 +00:00
ad602ff963 chore: v1.2.0 changelogs (#1712)
* chore(release): publish packages

 - flame@1.2.0
 - flame_audio@1.1.0
 - flame_bloc@1.5.0
 - flame_fire_atlas@1.1.0
 - flame_flare@1.2.0
 - flame_forge2d@0.12.0
 - flame_oxygen@0.1.3
 - flame_rive@1.3.0
 - flame_svg@1.3.0
 - flame_test@1.5.0
 - flame_tiled@1.5.0
2022-06-07 16:52:55 +02:00
49252f8ef2 feat: Add more lint rules (#1703)
Adds some more lint rules and fixes the issues those rules pointed out.
2022-06-06 19:23:25 +00:00
2711ba60c2 feat: Implement tap events based on componentsAtPoint (#1661)
This PR adds a new event system based on the componentsAtPoint delivery mechanism. These events allow for a proper support of components that implement renderTree() method. The CameraComponent is one such component, with more planned in the future.

Additionally, the following improvements compared to the current tap events added:

    - the same component can be tapped with multiple fingers simultaneously;
    - a component that received onTapDown is guaranteed to receive onTapUp or onTapCancel later;
    - a component that moves away from the point of touch will receive onTapCancel instead of onTapUp (even though the game widget receives onTapUp from Flutter).

Due to the fact that the switch from the current event system to the new event system is potentially a significant breaking change, the new event system is introduced as parallel to the existing one. This way we have more time to test the new system before recommending the switch and deprecating the old one; and the switch itself should feel more gradual.
2022-06-06 15:37:01 +00:00
843ddc3624 refactor: Move to package imports (#1625)
* refactor: Move to package imports

* Fix local imports

* Removed unused imports
2022-05-15 15:04:35 +00:00
cf393761a1 docs: Chapter 3 of the Klondike game tutorial (#1515) 2022-04-11 21:27:54 +00:00
87031b3e5f docs: Tutorial for making a Klondike card game, steps 1 & 2 (#1477) 2022-03-27 20:53:42 +00:00