mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 11:43:19 +08:00
Fixes in examples
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user