OLD | NEW |
1 import 'dart:sky'; | 1 import 'dart:sky'; |
2 import 'lib/game.dart'; | 2 import 'package:sky/framework/app.dart'; |
| 3 import 'lib/game_demo.dart'; |
3 import 'lib/sprites.dart'; | 4 import 'lib/sprites.dart'; |
4 import 'package:sky/framework/app.dart'; | 5 import 'package:sky/framework/app.dart'; |
5 | 6 |
6 AppView app; | 7 AppView app; |
7 | 8 |
8 void main() { | 9 void main() { |
9 // Load images | 10 // Load images |
10 new ImageMap([ | 11 new ImageMap([ |
11 "https://raw.githubusercontent.com/slembcke/GalacticGuardian.spritebuilder
/GDC/Packages/SpriteBuilder%20Resources.sbpack/resources-auto/BurnTexture.png", | 12 "https://raw.githubusercontent.com/slembcke/GalacticGuardian.spritebuilder
/GDC/Packages/SpriteBuilder%20Resources.sbpack/resources-auto/BurnTexture.png", |
12 "https://raw.githubusercontent.com/slembcke/GalacticGuardian.spritebuilder
/GDC/Packages/SpriteBuilder%20Resources.sbpack/Sprites/resources-auto/asteroid_b
ig_002.png", | 13 "https://raw.githubusercontent.com/slembcke/GalacticGuardian.spritebuilder
/GDC/Packages/SpriteBuilder%20Resources.sbpack/Sprites/resources-auto/asteroid_b
ig_002.png", |
13 "https://raw.githubusercontent.com/slembcke/GalacticGuardian.spritebuilder
/GDC/Packages/SpriteBuilder%20Resources.sbpack/Sprites/resources-auto/GG_blueshi
p_Lv3.png", | 14 "https://raw.githubusercontent.com/slembcke/GalacticGuardian.spritebuilder
/GDC/Packages/SpriteBuilder%20Resources.sbpack/Sprites/resources-auto/GG_blueshi
p_Lv3.png", |
| 15 "https://raw.githubusercontent.com/slembcke/GalacticGuardian.spritebuilder
/GDC/Packages/SpriteBuilder%20Resources.sbpack/Sprites/resources-auto/laserBlue.
png", |
14 ], | 16 ], |
15 allLoaded); | 17 allLoaded); |
16 } | 18 } |
17 | 19 |
18 void allLoaded(ImageMap loader) { | 20 void allLoaded(ImageMap loader) { |
19 // Create a new app with the sprite box that contains our game world | 21 app = new AppView(root: new GameDemoBox(new GameDemoWorld(loader))); |
20 //app = new AppView(new GameBox(new GameWorld(loader))); | |
21 //print("hello"); | |
22 app = new AppView((new GameTestsBox(new GameTests(loader), SpriteBoxTransformM
ode.nativePoints))); | |
23 } | 22 } |
OLD | NEW |