OLD | NEW |
---|---|
1 library pop_pop_win.html; | 1 library pop_pop_win.platform; |
2 | 2 |
3 import 'dart:async'; | 3 import '../platform_target.dart'; |
Siggi Cherem (dart-lang)
2014/04/21 22:00:56
this is already in the package, we suggest to writ
kevmoo
2014/04/21 22:22:54
Done.
| |
4 import 'dart:html'; | |
5 | |
6 import 'package:bot/bot.dart'; | |
7 import 'package:pop_pop_win/platform_target.dart'; | |
8 | |
9 import 'game.dart'; | |
10 | |
11 part 'html/high_score_view.dart'; | |
12 part 'html/game_view.dart'; | |
13 part 'html/game_storage.dart'; | |
14 part 'html/game_manager.dart'; | |
15 | 4 |
16 PlatformTarget _platformImpl; | 5 PlatformTarget _platformImpl; |
17 | 6 |
18 void initPlatform(PlatformTarget value) { | 7 void initPlatform(PlatformTarget value) { |
19 assert(value != null); | 8 assert(value != null); |
20 assert(!value.initialized); | 9 assert(!value.initialized); |
21 assert(_platformImpl == null); | 10 assert(_platformImpl == null); |
22 _platformImpl = value; | 11 _platformImpl = value; |
23 _platformImpl.initialize(); | 12 _platformImpl.initialize(); |
24 } | 13 } |
25 | 14 |
26 PlatformTarget get targetPlatform { | 15 PlatformTarget get targetPlatform { |
27 if (_platformImpl == null) { | 16 if (_platformImpl == null) { |
28 initPlatform(new PlatformTarget()); | 17 initPlatform(new PlatformTarget()); |
29 } | 18 } |
30 return _platformImpl; | 19 return _platformImpl; |
31 } | 20 } |
OLD | NEW |