Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Unified Diff: sky/sdk/example/game/main.dart

Issue 1223543004: Adds better explosions, shield, and game over (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: git cl web Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/example/game/lib/particle_system.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/example/game/main.dart
diff --git a/sky/sdk/example/game/main.dart b/sky/sdk/example/game/main.dart
index 22648ab2e5d9d6302b7adc7d007e2f810f34b35d..691fb249caa627bd271cc75f115450e23002c1a2 100644
--- a/sky/sdk/example/game/main.dart
+++ b/sky/sdk/example/game/main.dart
@@ -25,15 +25,18 @@ void allImagesLoaded(ImageMap loader) {
});
}
+GameDemoApp _app;
+
void allResourcesLoaded() {
- runApp(new GameDemoApp());
+ _app = new GameDemoApp();
+ runApp(_app);
}
class GameDemoApp extends App {
Widget build() {
return new Stack([
- new SpriteWidget(new GameDemoWorld(_loader, _spriteSheet)),
+ new SpriteWidget(new GameDemoWorld(_app, _loader, _spriteSheet)),
// new StackPositionedChild(
// new Flex([
// new FlexExpandingChild(
@@ -52,5 +55,9 @@ class GameDemoApp extends App {
}
}
+void resetGame() {
+ _app.scheduleBuild();
+}
+
ImageMap _loader;
SpriteSheet _spriteSheet;
« no previous file with comments | « sky/sdk/example/game/lib/particle_system.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698