Added the SizeEffect and a general ComponentEffect (#1122)

* Added the `SizeEffect` and a general `ComponentEffect`

* Added changelog entry

* Format throw

* Fix analyze issue

* Fix Transform2DEffect test

* Apply suggestions from code review

Co-authored-by: Luan Nico <luanpotter27@gmail.com>

* Fix missing example parenthesis

* Fix according to comments

Co-authored-by: Luan Nico <luanpotter27@gmail.com>
This commit is contained in:
Lukas Klingsbo
2021-11-22 21:55:14 +01:00
committed by GitHub
parent 37710113bb
commit f249b43e2f
9 changed files with 332 additions and 44 deletions

View File

@ -9,6 +9,7 @@ import 'move_effect_example.dart';
import 'old_move_effect_example.dart';
import 'old_rotate_effect_example.dart';
import 'old_scale_effect_example.dart';
import 'old_size_effect_example.dart';
import 'opacity_effect_example.dart';
import 'remove_effect_example.dart';
import 'rotate_effect_example.dart';
@ -20,9 +21,9 @@ void addEffectsStories(Dashbook dashbook) {
dashbook.storiesOf('Effects')
..add(
'Size Effect',
(_) => GameWidget(game: SizeEffectExample()),
(_) => GameWidget(game: OldSizeEffectExample()),
codeLink: baseLink('effects/size_effect_example.dart'),
info: SizeEffectExample.description,
info: OldSizeEffectExample.description,
)
..add(
'Scale Effect',
@ -83,6 +84,12 @@ void addEffectsStories(Dashbook dashbook) {
codeLink: baseLink('effects/rotate_effect_example.dart'),
info: RotateEffectExample.description,
)
..add(
'Size Effect (v2)',
(_) => GameWidget(game: SizeEffectExample()),
codeLink: baseLink('effects/size_effect_example.dart'),
info: SizeEffectExample.description,
)
..add(
'Scale Effect (v2)',
(_) => GameWidget(game: ScaleEffectExample()),