docs: Added bouncing ball example in collision_detection examples and updated flame_forge2d to latest (#1868)

This PR adds two updates.

It updates the flame_forge2d to latest version i.e on pub.dev in examples and padracing projects.

Adds a bouncing ball example in the collision detection examples demonstrating a simple example of collision and bouncing of a ball from the walls around it.
This commit is contained in:
RutvikTak
2022-08-29 15:04:33 +05:30
committed by GitHub
parent 4ac683984a
commit b1a6dd18f2
4 changed files with 116 additions and 2 deletions

View File

@ -1,5 +1,6 @@
import 'package:dashbook/dashbook.dart';
import 'package:examples/commons/commons.dart';
import 'package:examples/stories/collision_detection/bouncing_ball_example.dart';
import 'package:examples/stories/collision_detection/circles_example.dart';
import 'package:examples/stories/collision_detection/collidable_animation_example.dart';
import 'package:examples/stories/collision_detection/multiple_shapes_example.dart';
@ -23,6 +24,12 @@ void addCollisionDetectionStories(Dashbook dashbook) {
codeLink: baseLink('collision_detection/circles_example.dart'),
info: CirclesExample.description,
)
..add(
'Bouncing Ball',
(_) => GameWidget(game: BouncingBallExample()),
codeLink: baseLink('collision_detection/bouncing_ball_example.dart'),
info: BouncingBallExample.description,
)
..add(
'Multiple shapes',
(_) => GameWidget(game: MultipleShapesExample()),