mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 11:43:19 +08:00
game widget (#533)
This commit is contained in:
@ -2,11 +2,11 @@ import 'package:flame/effects/combined_effect.dart';
|
||||
import 'package:flame/effects/move_effect.dart';
|
||||
import 'package:flame/effects/scale_effect.dart';
|
||||
import 'package:flame/effects/rotate_effect.dart';
|
||||
import 'package:flame/game.dart';
|
||||
import 'package:flame/gestures.dart';
|
||||
import 'package:flame/extensions/offset.dart';
|
||||
import 'package:flame/extensions/vector2.dart';
|
||||
import 'package:flame/flame.dart';
|
||||
import 'package:flame/game.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import './square.dart';
|
||||
@ -14,7 +14,11 @@ import './square.dart';
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await Flame.util.fullScreen();
|
||||
runApp(MyGame().widget);
|
||||
runApp(
|
||||
GameWidget(
|
||||
game: MyGame(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class MyGame extends BaseGame with TapDetector {
|
||||
|
||||
Reference in New Issue
Block a user