Game Development Reference
In-Depth Information
oFile1 through iAudioFile5 and iSound1 through iSound5 respectively. Then change
the WAV audio file name reference to rightmono.wav , upmono.wav , down-
mono.wav , wmono.wav and smono.wav respectively. Your completed loadAudioAs-
sets() method should then look like the following Java method body, which is also
shown in Figure 15-15 :
private void loadAudioAssets() {
iAudioFile0 = getClass().getResource("/ leftmono.wav ");
iSound0 = new AudioClip( iAudioFile0 .toString());
iAudioFile1 =
getClass().getResource("/ rightmono.wav ");
iSound1 = new AudioClip( iAudioFile1 .toString());
iAudioFile2 = getClass().getResource("/ upmono.wav ");
iSound2 = new AudioClip( iAudioFile2 .toString());
iAudioFile3 = getClass().getResource("/ downmono.wav ");
iSound3 = new AudioClip( iAudioFile3 .toString());
iAudioFile4 = getClass().getResource("/ wmono.wav ");
iSound4 = new AudioClip( iAudioFile4 .toString());
iAudioFile5 = getClass().getResource("/ smono.wav ");
iSound5 = new AudioClip( iAudioFile5 .toString());
}
 
Search WWH ::




Custom Search