Commit Graph

16 Commits

Author SHA1 Message Date
Luan Nico
9c38c9bd04 New linter rules (#676) 2021-02-23 12:16:23 -05:00
Erick
19ff80a0eb Adds checking for trailling commas on the project (#670)
* Testing a new linter option for trailling commas

* Checking trailling commas on linter
2021-02-18 11:31:45 -03:00
pedia
e712d423dd fix SpriteAnimationComponent.shouldRemove use Component.shouldRemove (#666) 2021-02-16 23:20:11 -03:00
Erick
0d4df1acc2 Preventing errors caused by the premature use of size property on game (#659) 2021-02-15 17:07:58 -05:00
Lukas Klingsbo
0593e35766 Add hitbox to PositionComponent (#618)
* Move out collision detection methods

* Add possibility to define a hull for PositionComponents

* Add example of how to use hull with tapable

* Update contains point comment

* Fix contains point

* Hull should be based on center position

* Remove collision detection parts

* Added tests

* Use percentage of size instead of absolute size

* Separate hull from PositionComponent

* Clarify hull example

* Fix formatting

* Override correct method

* Use mixin for hitbox

* Update changelog

* Rename HasHitbox to Hitbox

* Clarified names

* Center to edge is considered as 1.0

* Fix test

* Add spaces within braces

* Removed extra spaces in the braces

* Add hitbox docs

* Fix link

* Moved point rotation to Vector2 extension

* Render hitbox within extension

* Fix rebase

* Fix rebase

* Fix formatting
2021-01-20 23:39:01 +01:00
Renan
ccee9a466b Move files to src and comply with the dart package layout convention (#621)
* 👌 Use `Offset` type directly in `JoystickAction.update` calculations (#631)

* Move files to src and comply with the dart package layout convention

* Fixing widgets example

Co-authored-by: Serge Matveenko <lig@countzero.co>
Co-authored-by: Erick Zanardo <erickzanardoo@gmail.com>
2021-01-20 09:05:43 -03:00
Lukas Klingsbo
18d04c13c0 Remove Resizable mixin (#589)
* Remove Resizable mixin

* Update examples and changelog

* Fixed formatting

* Remove unused import
2020-12-22 15:55:29 +01:00
Lukas Klingsbo
692213d5a4 Properly propagate onMount and onRemove to children (#579)
* Fix rendering of children

* Game loop handles other restore

* Properly propagate onMount and onRemove to children

* Use BaseGame on gestures to minimize confusion

* Fix linting

* All children don't need preparation

* Add composability example

* gameRef might not be defined

* Add mustCallSuper

* isMounted on game

* Remove unused gameRef argument

* Made isMounted only modifiable by the component

* Move dartdoc to public isMounted

* Fix formatting
2020-12-21 12:42:45 +01:00
Erick Zanardo
c020383887 Linting 2020-12-12 18:28:00 +00:00
Erick Zanardo
11628b1edb Adding tests and handling composed components 2020-12-12 18:28:00 +00:00
Erick Zanardo
4c9b89b849 Fixing tests 2020-12-12 18:26:52 +00:00
Renan
2f2ab1341e game widget (#533) 2020-12-09 10:10:12 +00:00
Lukas Klingsbo
8665172ed9 Take angle into account for taps 2020-12-09 10:10:11 +00:00
Lukas Klingsbo
81eaf05b22 Use booleans instead of methods for simple values 2020-11-15 18:56:17 +01:00
Lukas Klingsbo
ea64b239b5 Clarification comment about update after adding component 2020-11-15 01:18:51 +01:00
Lukas Klingsbo
ce42f4d433 Add simple test for components in basegame 2020-11-15 01:18:51 +01:00