mirror of https://github.com/flutter/pinball.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
527 B
23 lines
527 B
import 'package:flame/input.dart';
|
|
import 'package:flame_forge2d/flame_forge2d.dart';
|
|
|
|
class TestGame extends Forge2DGame {
|
|
TestGame([List<String>? assets]) : _assets = assets {
|
|
images.prefix = '';
|
|
}
|
|
|
|
final List<String>? _assets;
|
|
|
|
@override
|
|
Future<void> onLoad() async {
|
|
if (_assets != null) {
|
|
await images.loadAll(_assets!);
|
|
}
|
|
await super.onLoad();
|
|
}
|
|
}
|
|
|
|
class KeyboardTestGame extends TestGame with HasKeyboardHandlerComponents {
|
|
KeyboardTestGame([List<String>? assets]) : super(assets);
|
|
}
|