Fixes in examples

This commit is contained in:
Luan Nico
2020-08-02 15:29:59 -04:00
parent c5378c9bd6
commit b2c88e31da
12 changed files with 80 additions and 48 deletions

View File

@ -12,15 +12,18 @@ void main() async {
class MyGame extends BaseGame {
MyGame() {
final images = [
ParallaxImage("bg.png"),
ParallaxImage("mountain-far.png"),
ParallaxImage("mountains.png"),
ParallaxImage("trees.png"),
ParallaxImage("foreground-trees.png"),
ParallaxImage('bg.png'),
ParallaxImage('mountain-far.png'),
ParallaxImage('mountains.png'),
ParallaxImage('trees.png'),
ParallaxImage('foreground-trees.png'),
];
final parallaxComponent = ParallaxComponent(images,
baseSpeed: const Offset(20, 0), layerDelta: const Offset(30, 0));
final parallaxComponent = ParallaxComponent(
images,
baseSpeed: const Offset(20, 0),
layerDelta: const Offset(30, 0),
);
add(parallaxComponent);
}