Migrate examples back, change to monorepo (#701)

This commit is contained in:
Luan Nico
2021-03-12 09:24:50 -05:00
committed by GitHub
parent d3e8b87ee6
commit 769bb711c3
334 changed files with 2283 additions and 3279 deletions

View File

@ -0,0 +1,22 @@
import 'package:flame/components.dart';
import 'package:flame/game.dart';
class BasicParallaxGame extends BaseGame {
final _imageNames = [
'parallax/bg.png',
'parallax/mountain-far.png',
'parallax/mountains.png',
'parallax/trees.png',
'parallax/foreground-trees.png',
];
@override
Future<void> onLoad() async {
final parallax = await loadParallaxComponent(
_imageNames,
baseVelocity: Vector2(20, 0),
velocityMultiplierDelta: Vector2(1.8, 1.0),
);
add(parallax);
}
}