Add hoverables (#797)

This commit is contained in:
Luan Nico
2021-05-21 09:04:12 -04:00
committed by GitHub
parent 8f7c773f82
commit 9c1808ca92
12 changed files with 302 additions and 34 deletions

View File

@ -4,6 +4,7 @@ import 'package:flame/game.dart';
import '../../commons/commons.dart';
import 'advanced_joystick.dart';
import 'draggables.dart';
import 'hoverables.dart';
import 'joystick.dart';
import 'keyboard.dart';
import 'mouse_movement.dart';
@ -55,16 +56,18 @@ void addControlsStories(Dashbook dashbook) {
(context) {
return GameWidget(
game: DraggablesGame(
zoom: context.listProperty(
'zoom',
1,
[0.5, 1, 1.5],
),
zoom: context.listProperty('zoom', 1, [0.5, 1, 1.5]),
),
);
},
codeLink: baseLink('controls/draggables.dart'),
)
..add(
'Hoverables',
(_) => GameWidget(game: HoverablesGame()),
codeLink: baseLink('controls/hoverables.dart'),
info: 'Add more squares by clicking. Hover squares to change colors.',
)
..add(
'Joystick',
(_) => GameWidget(game: JoystickGame()),