Created
November 24, 2019 14:31
-
-
Save Dev-Owl/2bc3a7737e36cc05420f8fa340257cc6 to your computer and use it in GitHub Desktop.
Main file for our mazeball
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flame/util.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
import 'package:mazeball/game.dart'; | |
import 'dart:async'; | |
void main() async { | |
//Make sure flame is ready before we launch our game | |
await setupFlame(); | |
var game = new MazeBallGame(); | |
runApp(game.widget); | |
} | |
/// Setup all Flame specific parts | |
Future setupFlame() async { | |
var flameUtil = Util(); | |
await flameUtil.fullScreen(); | |
await flameUtil.setOrientation(DeviceOrientation.portraitUp); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment