Unify examples structure (#1118)

* Animations, CameraAndViewport, CollisionDetection and Components unified

* Added descriptions to effects

* Rename input games

* Unify input stories

* Add info to parallax section

* Added descriptions to the rendering examples

* Add descriptions to the sprites directory

* Fix utils and rendering section

* Add descriptions to the widgets section

* Delete directory that rebase brought back

* Unify game names

* Added some styleguide docs for examples

* Fix analyze issues

* All files should have _example as suffix

* Made the FollowComponentExample a bit easier to understand

* Change priority of ember
This commit is contained in:
Lukas Klingsbo
2021-11-19 14:28:04 +01:00
committed by GitHub
parent 904481d289
commit 8b132d7c0b
90 changed files with 1574 additions and 1140 deletions

View File

@ -2,43 +2,49 @@ import 'package:dashbook/dashbook.dart';
import 'package:flame/game.dart';
import '../../commons/commons.dart';
import 'base64.dart';
import 'basic.dart';
import 'sprite_group.dart';
import 'spritebatch.dart';
import 'spritebatch_auto_load.dart';
import 'spritesheet.dart';
import 'base64_sprite_example.dart';
import 'basic_sprite_example.dart';
import 'sprite_group_example.dart';
import 'spritebatch_example.dart';
import 'spritebatch_load_example.dart';
import 'spritesheet_example.dart';
void addSpritesStories(Dashbook dashbook) {
dashbook.storiesOf('Sprites')
..add(
'Basic Sprite',
(_) => GameWidget(game: BasicSpriteGame()),
codeLink: baseLink('sprites/basic.dart'),
(_) => GameWidget(game: BasicSpriteExample()),
codeLink: baseLink('sprites/basic_animation_example.dart'),
info: BasicSpriteExample.description,
)
..add(
'Base64 Sprite',
(_) => GameWidget(game: Base64SpriteGame()),
codeLink: baseLink('sprites/base64.dart'),
(_) => GameWidget(game: Base64SpriteExample()),
codeLink: baseLink('sprites/base64_sprite_example.dart'),
info: Base64SpriteExample.description,
)
..add(
'Spritesheet',
(_) => GameWidget(game: SpritesheetGame()),
codeLink: baseLink('sprites/spritesheet.dart'),
(_) => GameWidget(game: SpritesheetExample()),
codeLink: baseLink('sprites/spritesheet_example.dart'),
info: SpritesheetExample.description,
)
..add(
'Spritebatch',
(_) => GameWidget(game: SpritebatchGame()),
codeLink: baseLink('sprites/spritebatch.dart'),
(_) => GameWidget(game: SpritebatchExample()),
codeLink: baseLink('sprites/spritebatch_example.dart'),
info: SpritebatchExample.description,
)
..add(
'Spritebatch Auto Load',
(_) => GameWidget(game: SpritebatchAutoLoadGame()),
codeLink: baseLink('sprites/spritebatch_auto_load.dart'),
(_) => GameWidget(game: SpritebatchLoadExample()),
codeLink: baseLink('sprites/spritebatch_load_example.dart'),
info: SpritebatchLoadExample.description,
)
..add(
'SpriteGroup',
(_) => GameWidget(game: SpriteGroupExample()),
codeLink: baseLink('sprites/sprite_group.dart'),
codeLink: baseLink('sprites/sprite_group_example.dart'),
info: SpriteGroupExample.description,
);
}