Commit Graph

3302 Commits

Author SHA1 Message Date
Renan
86394dd3e0 fix: Fix SpriteAnimationWidget lifecycle (#1212)
Adding flutter lifecycle method implementation to the sprite animation widget.
2021-12-26 19:14:30 +01:00
Lukas Klingsbo
72161ad8d2 fix: Both places should have strictMode = false (#1272) 2021-12-26 15:11:35 +00:00
Lukas Klingsbo
6936e1d98b feat: Turn off strictMode for children (#1271)
In some situations where you don't know whether you need to use children.query or not it will be a performance hit to be forced to register the query, since when children.register is called the set is initialized, even though the children set might never be used.
2021-12-26 15:30:06 +01:00
YohanWadia
d1f3243fe4 docs: Fix overlays link 2021-12-23 12:22:11 +01:00
Pasha Stetsenko
49a2d0b9ec feat(flame_test): Added parameter repeatCount into function testRandom (#1265)
Added optional parameter repeatCount in function testRandom(), allowing the same test to run multiple times with different seeds.
2021-12-22 10:21:52 +01:00
Ryuzaki
f6be66abd5 feat: Expose priority for TiledComponent (#1259) 2021-12-21 14:10:28 +01:00
Ryuzaki
994f27d54c docs: Add Raycast example for flame_forge2d (#1253)
Adds a new sample in flame_forge2d for Raycast. It contains a sample implementation for finding nearest and farthest fixtures along the casted ray. Here is how it works, two rays (red and blue) are fired from same starting point with mouse position as the target. Red ray always stops at the nearest fixture and blue ray always stop at the farthest fixture. Paint of fixtures are changed depending on which ray hits it. If both rays hit the same fixture, it turns yellow.
2021-12-21 10:25:07 +00:00
Ryuzaki
84e3265dae docs: Fix some typos and correct some snippets (#1257) 2021-12-21 10:45:05 +01:00
Lukas Klingsbo
5ddcc6f7ba fix: Call onCollisionEnd on removal of Collidable (#1247)
When removing a Collidable from the game the onCollidionEnd callbacks should be called for affected Collidables and HitboxShapes.
2021-12-20 20:28:12 +00:00
Lukas Klingsbo
9b95686ba5 feat: onCollisionStart for Collidable and HitboxShape (#1251)
Introduces onCollsionStart for Collidable and HitboxShape, which is called only once when the collision starts.
2021-12-20 20:02:41 +00:00
Ryuzaki
d1d6ad4d8c fix: Clone input vector before projecting it (#1255)
* Clone input vector before flipping

* Add test for projectVector
2021-12-20 20:15:09 +01:00
Lukas Klingsbo
4f0fb2de6f fix: HudMarginComponent positioning on zoom (#1250)
This fixes so that the HudMarginComponent uses the size of the viewport instead of the zoomed size from the game.
2021-12-19 23:55:10 +01:00
Pasha Stetsenko
ed227e7c74 refactor: Removed parameter Component.updateTree({callOwnUpdate}) (#1224)
- Component.updateTree() method will no longer have the optional parameter callOwnUpdate.
2021-12-19 11:41:29 +00:00
Luan Nico
bac6c8a446 refactor: Add a few more rules to flame_lint, including use_key_in_widget_constructors (#1248)
This:

    Add new rule use_if_null_to_convert_nulls_to_bools to flame_lint (no violations)
    Add new rule use_key_in_widget_constructors (several violations)
    Fix violations
    Exclude generated files from flame_lint (we don't have any on this repo but when using on games often there are)

I believe this is not a breaking change because it just adds optional arguments to constructors, but if it is, we can reconsider this PR.
2021-12-19 11:07:42 +01:00
Pasha Stetsenko
ce48d77ad7 refactor: Component.ancestors() is now an iterator (#1242)
- Removed property Component._ancestors, which was a list stored with every Component object, but barely ever used. Removing this property reduces the overall memory footprint of the Component class;
 - Method ancestors() now returns an Iterable instead of a List. Generally this should improve performance, since the most likely use of this method is to iterate over the chain of ancestors.
2021-12-18 21:08:28 +00:00
Pasha Stetsenko
af45ea6cc4 feat: Added closeToVector in flame_test (#1245)
Added matcher closeToVector to help test equality of vectors. This matcher

    follows standard Flutter convention for writing tests as expect(value, matcher);
    provides meaningful description of the mismatch in case the test fails.

Also: fixed the name of the fails_assert_test, which wasn't running automatically because the file name did not end with _test.
2021-12-18 18:32:16 +00:00
Luan Nico
d70284033c doc: Fix typo on CONTRIBUTING.md (#1246)
Fix typo on CONTRIBUTING.md
2021-12-18 17:54:48 +00:00
Lukas Klingsbo
7d3eeb73c5 fix: prepareComponent should never run again on a prepared component (#1237)
Since prepareComponent can be called multiple times for non-root children we need to make sure that it is only called once.
2021-12-18 18:42:08 +01:00
Lukas Klingsbo
628c0c4963 docs: Correct conventional commit type (doc -> docs) (#1238) 2021-12-17 09:36:17 -03:00
Pasha Stetsenko
eb30c2e5e9 refactor: Simplify GameWidgetState.loaderFuture (#1232)
The code in loaderFuture can be simplified using async.
2021-12-17 11:30:01 +01:00
Luan Nico
fb03e0ab96 doc: Improve Features section, remove the usage of Currently (#1233) 2021-12-16 15:59:21 -05:00
Pasha Stetsenko
6d43f39f2b chore: Add coverage script to melos.yaml (#1229)
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-12-16 18:28:06 +01:00
Pasha Stetsenko
3596853b55 chore: Add missing packages to melos.yaml (#1228)
* chore: Add missing packages to melos.yaml

* added melos badge to readme

* fix melos badge in readme

* Remove style=flat-square

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-12-16 16:16:34 +01:00
Pasha Stetsenko
66ad4b08af perf: Allow components to have null children (#1231)
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-12-16 15:55:39 +01:00
Lukas Klingsbo
5828b6f369 fix: Allow most basic and advanced gesture detectors together (#1208)
Most gesture detectors work together now, except for the PanDetector or ScaleDetector together with the MultiTouchDragDetector. Maybe even the ScaleDetector will work with the MultiTouchDragDetector, will have to try.
2021-12-16 14:15:01 +01:00
Lukas Klingsbo
23b1dd8bbc fix: Add missing priority argument for JoystickComponent (#1227)
Add missing `priority` argument for `JoystickComponent
2021-12-15 21:46:01 +01:00
Lukas Klingsbo
e1c3d69d41 build: Add Melos and update contributing doc (#1207)
This PR adds Melos and updates the contributing doc accordingly
2021-12-15 15:47:10 +01:00
Pasha Stetsenko
a0cf56ee0c chore: Ensure unique names for all flame sub-packages (#1214)
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-12-14 13:22:12 -03:00
José Alfú Tochez
427c567c41 docs: #1195-Update-README.md-for-other-languages (#1215) 2021-12-14 12:21:07 +01:00
Pasha Stetsenko
932a81118b feat: Effect.onComplete callback as an alternative to onFinish() (#1201)
* Effect.onFinish is now a user-defined function

* review suggestion

* Restore onFinish method

* docs

* move method to its old place

* Rename onFinish -> onFinishCallback

* Update docs
2021-12-13 13:07:01 +01:00
Pasha Stetsenko
cdb2650b29 feat: Add RandomEffectController (#1203)
* Create RandomEffectController

* added tests

* added example

* documentation

* formatting

* fix a test

* formatting

Co-authored-by: Erick <erickzanardoo@gmail.com>
2021-12-13 00:38:05 +01:00
Matt Newnham
3b20129c8b Adding filterQuality override to parallax (#1206)
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-12-12 11:14:29 -03:00
Ryuzaki
49be643cab fix: Make string input a named parameter in example code (#1205) 2021-12-11 13:56:07 +01:00
Pasha Stetsenko
223ab75886 feat: Component.childrenFactory can be used to set up a global ComponentSet factory (#1193)
* Added Component.childrenFactory

* fix some of the lint warnings

* more lint warnings

* remove changelog entry

* more analyzer warnings

* one more warning

* one more warning

* remove more unused imports

* fix more warnings

* another warning

* one more warning

* a lot more warnings

* some more warnings

* fix warnings in flame_svg

* fix warnings in flame_bloc

* chore: Max line length of 80 (#1199)

* docs: Max line length of 80

* Fix missing >80 character lines

* Ugly, but that's how the formatter wants it

* added a test

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-12-11 12:58:50 +01:00
Lukas Klingsbo
2d532bc704 chore: Max line length of 80 (#1199)
* docs: Max line length of 80

* Fix missing >80 character lines

* Ugly, but that's how the formatter wants it
2021-12-10 21:29:05 +00:00
Alex Li
21557c0978 📝 Improve CN README (#1202) 2021-12-10 11:57:01 +01:00
Pasha Stetsenko
ac4684177f Prevent docs side menu from changing size (#1198) 2021-12-09 20:05:18 +01:00
Lukas Klingsbo
93b763e1c0 docs: Update contributions to flame_tiled (#1197) 2021-12-09 15:18:52 +00:00
Yunus AK
93d9d3526e docs: fix faulty flame_lint link in README.md
#1194 fixed flame_lint link
2021-12-09 14:53:34 +00:00
Lukas Klingsbo
5c47d7f6d7 chore: analyze issues introduced from new dart version (#1196)
* Added Component.childrenFactory

* fix some of the lint warnings

* more lint warnings

* remove changelog entry

* more analyzer warnings

* one more warning

* one more warning

* remove more unused imports

* fix more warnings

* another warning

* one more warning

* a lot more warnings

* some more warnings

* fix warnings in flame_svg

* fix warnings in flame_bloc

* Remove OrderedSet override feature

* Remove testRandom change

* Remove unnecessary type checks

* Re-remove deprecated argument in random_test

Co-authored-by: Pasha Stetsenko <stpasha@google.com>
2021-12-09 15:40:43 +01:00
Lukas Klingsbo
b6ddae5c61 Publish flame tiled 1.0.0 (#1192) 2021-12-08 23:44:21 +00:00
Lukas Klingsbo
fd33ed2bc7 Publish flame svg 1.0.0 (#1191) 2021-12-08 23:31:50 +00:00
Lukas Klingsbo
ff7736d868 Publish flame rive 1.0.0 (#1190) 2021-12-08 22:31:59 +00:00
Lukas Klingsbo
080fb958fe Publish flame oxygen 0.1.1 (#1189) 2021-12-08 21:07:09 +00:00
Lukas Klingsbo
d36a284efc Publish flame bloc 1.0.0 (#1186)
* Publish flame bloc 1.0.0

* Revert to path dependencies
2021-12-08 20:54:18 +00:00
Lukas Klingsbo
ff79ff9f71 Publish v1 flame_flare (#1188) 2021-12-08 20:38:05 +00:00
Lukas Klingsbo
cc55f87015 Publish flame fire atlas 1.0.0 (#1187) 2021-12-08 20:19:46 +00:00
Lukas Klingsbo
c2155a9ef1 Publish flame audio 1.0.0 (#1185)
* Publish flame audio 1.0.0

* Published 1.0.0 flame_audio
2021-12-08 18:59:45 +00:00
Lukas Klingsbo
cca79f8dd8 Publish flame test 1.0.1 (#1184)
* flame_test 1.0.1

* Updated changelog

* Revert to path again
2021-12-08 18:44:12 +00:00
Lukas Klingsbo
42c0df6374 Update Flame version to 1.0.0 (#1183)
* Update version to 1.0.0

* Revert back to paths
2021-12-08 18:29:51 +00:00