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

Side by Side Diff: samples/pop_pop_win/lib/src/platform.dart

Issue 242443008: samples/pop_pop_win: now based on StageXL (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: added Alex to authors Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698