mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 10:38:17 +08:00
Merge branch 'v1.0.0' into erick.assets-refactor-2
This commit is contained in:
@ -22,7 +22,7 @@ class MyGame extends BaseGame {
|
||||
Future<void> onLoad() async {
|
||||
final r = Random();
|
||||
final image = await images.load('test.png');
|
||||
List.generate(500, (i) => SpriteComponent.square(32, image))
|
||||
List.generate(500, (i) => SpriteComponent.fromImage(Vector2.all(32), image))
|
||||
.forEach((sprite) {
|
||||
sprite.x = r.nextInt(size.x.toInt()).toDouble();
|
||||
sprite.y = r.nextInt(size.y.toInt()).toDouble();
|
||||
|
||||
Reference in New Issue
Block a user