mirror of
https://github.com/flame-engine/flame.git
synced 2025-10-31 00:48:47 +08:00
Migrate examples back, change to monorepo (#701)
This commit is contained in:
16
examples/lib/stories/sprites/basic.dart
Normal file
16
examples/lib/stories/sprites/basic.dart
Normal file
@ -0,0 +1,16 @@
|
||||
import 'package:flame/components.dart';
|
||||
import 'package:flame/game.dart';
|
||||
|
||||
class BasicSpriteGame extends BaseGame {
|
||||
@override
|
||||
Future<void> onLoad() async {
|
||||
final sprite = await loadSprite('flame.png');
|
||||
add(
|
||||
SpriteComponent(
|
||||
sprite: sprite,
|
||||
position: Vector2.all(100),
|
||||
size: sprite.srcSize * 2,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user