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

Side by Side Diff: samples/pop_pop_win/web/_audio.dart

Issue 200723008: samples/poppopwin: upgrade to first-class sample (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixed pkgbuild.status for rename Created 6 years, 9 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
« no previous file with comments | « samples/pop_pop_win/tool/hop_runner.dart ('k') | samples/pop_pop_win/web/favicon.ico » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 part of game; 1 part of game;
2 2
3 class _Audio { 3 class _Audio {
4 static const List<String> _AUDIO_NAMES = 4 static const List<String> _AUDIO_NAMES =
5 const ['Pop0', 'Pop1', 'Pop2', 'Pop3', 'Pop4', 'Pop5', 'Pop6', 'Pop7', 'Po p8', 5 const ['Pop0', 'Pop1', 'Pop2', 'Pop3', 'Pop4', 'Pop5', 'Pop6', 'Pop7', 'Po p8',
6 'Bomb0', 'Bomb1', 'Bomb2', 'Bomb3', 'Bomb4', 6 'Bomb0', 'Bomb1', 'Bomb2', 'Bomb3', 'Bomb4',
7 GameAudio.THROW_DART, GameAudio.FLAG, GameAudio.UNFLAG, GameAudio.C LICK, GameAudio.WIN]; 7 GameAudio.THROW_DART, GameAudio.FLAG, GameAudio.UNFLAG, GameAudio.C LICK, GameAudio.WIN];
8 8
9 final AudioLoader _audioLoader; 9 final AudioLoader _audioLoader;
10 final Map<String, AudioBuffer> _buffers = new Map(); 10 final Map<String, AudioBuffer> _buffers = new Map();
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 } 114 }
115 } catch (e) { 115 } catch (e) {
116 print("Error getting client info: ${e}"); 116 print("Error getting client info: ${e}");
117 } 117 }
118 return null; 118 return null;
119 } 119 }
120 120
121 static String _getAudioPath(String name) { 121 static String _getAudioPath(String name) {
122 assert(_audioFormat != null); 122 assert(_audioFormat != null);
123 return 'audio/${_audioFormat}/$name.${_audioFormat}'; 123 return '${_ASSET_DIR}audio/${_audioFormat}/$name.${_audioFormat}';
124 } 124 }
125 125
126 static Iterable<String> _getAudioPaths(Iterable<String> names) { 126 static Iterable<String> _getAudioPaths(Iterable<String> names) {
127 return names.map(_getAudioPath); 127 return names.map(_getAudioPath);
128 } 128 }
129 } 129 }
OLDNEW
« no previous file with comments | « samples/pop_pop_win/tool/hop_runner.dart ('k') | samples/pop_pop_win/web/favicon.ico » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698