mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 03:15:43 +08:00
game widget (#533)
This commit is contained in:
@ -6,15 +6,15 @@ import 'package:flame/components/position_component.dart';
|
||||
import 'package:flame/components/mixins/tapable.dart';
|
||||
|
||||
void main() {
|
||||
final game = MyGame();
|
||||
|
||||
final widget = Container(
|
||||
padding: const EdgeInsets.all(50),
|
||||
color: const Color(0xFFA9A9A9),
|
||||
child: game.widget,
|
||||
runApp(
|
||||
Container(
|
||||
padding: const EdgeInsets.all(50),
|
||||
color: const Color(0xFFA9A9A9),
|
||||
child: GameWidget(
|
||||
game: MyGame(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
runApp(widget);
|
||||
}
|
||||
|
||||
class TapableSquare extends PositionComponent with Tapable {
|
||||
|
||||
Reference in New Issue
Block a user