Index: sky/examples/game/main.dart |
diff --git a/sky/examples/game/main.dart b/sky/examples/game/main.dart |
index 4a584eb2d46037e4e07471b7902ba77efbfe3ee1..9d54b06a0a0f63bd2071e7fdc27336d880dc86bb 100644 |
--- a/sky/examples/game/main.dart |
+++ b/sky/examples/game/main.dart |
@@ -6,6 +6,15 @@ import 'package:sky/framework/app.dart'; |
AppView app; |
void main() { |
+ // Load images |
+ new ImageMap([ |
+ "https://raw.githubusercontent.com/slembcke/GalacticGuardian.spritebuilder/GDC/Packages/SpriteBuilder%20Resources.sbpack/resources-auto/BurnTexture.png", |
+ "https://raw.githubusercontent.com/slembcke/GalacticGuardian.spritebuilder/GDC/Packages/SpriteBuilder%20Resources.sbpack/Sprites/resources-auto/asteroid_big_002.png", |
+ ], |
+ allLoaded); |
+} |
+ |
+void allLoaded(ImageMap loader) { |
// Create a new app with the sprite box that contains our game world |
- app = new AppView(new SpriteBox(new GameWorld(1024.0, 1024.0),SpriteBoxTransformMode.letterbox)); |
+ app = new AppView(new SpriteBox(new GameWorld(loader),SpriteBoxTransformMode.letterbox)); |
} |