mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-03 20:36:31 +08:00
flutter formar
This commit is contained in:
@ -24,7 +24,6 @@ class MyHomePage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _MyHomePageState extends State<MyHomePage> {
|
class _MyHomePageState extends State<MyHomePage> {
|
||||||
|
|
||||||
Position _position = Position(256.0, 256.0);
|
Position _position = Position(256.0, 256.0);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import 'position.dart';
|
|||||||
///
|
///
|
||||||
/// Subclass this to implement the [update] and [render] methods.
|
/// Subclass this to implement the [update] and [render] methods.
|
||||||
/// Flame will deal with calling these methods properly when the game's widget is rendered.
|
/// Flame will deal with calling these methods properly when the game's widget is rendered.
|
||||||
abstract class Game {
|
abstract class Game {
|
||||||
// Widget Builder for this Game
|
// Widget Builder for this Game
|
||||||
final builder = WidgetBuilder();
|
final builder = WidgetBuilder();
|
||||||
|
|
||||||
@ -44,7 +44,6 @@ abstract class Game {
|
|||||||
/// Returns the game widget. Put this in your structure to start rendering and updating the game.
|
/// Returns the game widget. Put this in your structure to start rendering and updating the game.
|
||||||
/// You can add it directly to the runApp method or inside your widget structure (if you use vanilla screens and widgets).
|
/// You can add it directly to the runApp method or inside your widget structure (if you use vanilla screens and widgets).
|
||||||
Widget get widget => builder.build(this);
|
Widget get widget => builder.build(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class WidgetBuilder {
|
class WidgetBuilder {
|
||||||
|
|||||||
Reference in New Issue
Block a user