game widget (#533)

This commit is contained in:
Renan
2020-12-06 20:32:30 +00:00
committed by renancaraujo
parent 4939b708dd
commit 2f2ab1341e
46 changed files with 711 additions and 391 deletions

View File

@ -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 {