mirror of
				https://github.com/flame-engine/flame.git
				synced 2025-10-31 00:48:47 +08:00 
			
		
		
		
	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:
		| @ -2,35 +2,36 @@ import 'package:dashbook/dashbook.dart'; | ||||
| import 'package:flame/game.dart'; | ||||
|  | ||||
| import '../../commons/commons.dart'; | ||||
| import 'circles.dart'; | ||||
| import 'collidable_animation.dart'; | ||||
| import 'multiple_shapes.dart'; | ||||
| import 'simple_shapes.dart'; | ||||
| import 'circles_example.dart'; | ||||
| import 'collidable_animation_example.dart'; | ||||
| import 'multiple_shapes_example.dart'; | ||||
| import 'simple_shapes_example.dart'; | ||||
|  | ||||
| void addCollisionDetectionStories(Dashbook dashbook) { | ||||
|   dashbook.storiesOf('Collision Detection') | ||||
|     ..add( | ||||
|       'Collidable AnimationComponent', | ||||
|       (_) => GameWidget(game: CollidableAnimationExample()), | ||||
|       codeLink: baseLink('collision_detection/collidable_animation.dart'), | ||||
|       codeLink: | ||||
|           baseLink('collision_detection/collidable_animation_example.dart'), | ||||
|       info: CollidableAnimationExample.description, | ||||
|     ) | ||||
|     ..add( | ||||
|       'Circles', | ||||
|       (_) => GameWidget(game: CirclesExample()), | ||||
|       codeLink: baseLink('collision_detection/circles.dart'), | ||||
|       codeLink: baseLink('collision_detection/circles_example.dart'), | ||||
|       info: CirclesExample.description, | ||||
|     ) | ||||
|     ..add( | ||||
|       'Multiple shapes', | ||||
|       (_) => GameWidget(game: MultipleShapesExample()), | ||||
|       codeLink: baseLink('collision_detection/multiple_shapes.dart'), | ||||
|       codeLink: baseLink('collision_detection/multiple_shapes_example.dart'), | ||||
|       info: MultipleShapesExample.description, | ||||
|     ) | ||||
|     ..add( | ||||
|       'Simple Shapes', | ||||
|       (_) => GameWidget(game: SimpleShapesExample()), | ||||
|       codeLink: baseLink('collision_detection/simple_shapes.dart'), | ||||
|       codeLink: baseLink('collision_detection/simple_shapes_example.dart'), | ||||
|       info: SimpleShapesExample.description, | ||||
|     ); | ||||
| } | ||||
|  | ||||
| @ -17,6 +17,7 @@ class SimpleShapesExample extends FlameGame with HasTappables { | ||||
|     tap on an already existing shape it will remove that shape and replace it | ||||
|     with a new one. | ||||
|   '''; | ||||
| 
 | ||||
|   final _rng = Random(); | ||||
| 
 | ||||
|   MyShapeComponent randomShape(Vector2 position) { | ||||
		Reference in New Issue
	
	Block a user
	 Lukas Klingsbo
					Lukas Klingsbo