本文整理匯總了Java中com.badlogic.gdx.audio.Music.dispose方法的典型用法代碼示例。如果您正苦於以下問題:Java Music.dispose方法的具體用法?Java Music.dispose怎麽用?Java Music.dispose使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.badlogic.gdx.audio.Music
的用法示例。
在下文中一共展示了Music.dispose方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: disposeSound
import com.badlogic.gdx.audio.Music; //導入方法依賴的package包/類
@Override
public final void disposeSound( SoundAsset asset ) {
if ( asset.isStreaming() ) {
Music music = this.music.remove( asset.index() );
if ( music != null ) {
music.dispose();
}
} else {
if ( sounds.contains( asset.index() ) ) {
com.badlogic.gdx.audio.Sound sound = sounds.remove( asset.index() );
if ( sound != null ) {
sound.dispose();
}
}
}
}
示例2: removeMusic
import com.badlogic.gdx.audio.Music; //導入方法依賴的package包/類
public void removeMusic(String key) {
Music m = musics.get(key);
if (m != null) {
m.dispose();
}
musics.remove(key);
}
示例3: dispose
import com.badlogic.gdx.audio.Music; //導入方法依賴的package包/類
public void dispose(){
for(Music music: _queuedMusic.values()){
music.dispose();
}
for(Sound sound: _queuedSounds.values()){
sound.dispose();
}
}
示例4: dispose
import com.badlogic.gdx.audio.Music; //導入方法依賴的package包/類
@Override
public final void dispose( FFContext context ) {
for ( com.badlogic.gdx.audio.Sound sound : sounds ) {
sound.dispose();
}
sounds.clear();
for ( Music m : music ) {
m.dispose();
}
music.clear();
}
示例5: onCompletion
import com.badlogic.gdx.audio.Music; //導入方法依賴的package包/類
@Override
public void onCompletion(Music music) {
if (isABRepeatMode && !done) {
resetMarks();
if (hasMusic) {
theSong.pause();
theSong.setPosition(aPosition);
theSong.play();
lastmtime = theSong.getPosition();
time = lastmtime + world.delay;
timeSyncAcc = 0;
} else {
time = aPosition;
}
return;
}
if (hasMusic) {
music.dispose();
}
done = true;
if (this.largestCombo < this.combo) {
this.largestCombo = combo;
}
Results.bads = badCount;
Results.goods = goodCount;
Results.greats = greatCount;
Results.perfects = perfectCount;
Results.miss = missCount;
Results.combo = largestCombo;
Results.accuracy = calculateAccuracy();
Results.normalizedAccuracy = calculateNormalizedAccuracy();
accuracyMarkers.clear();
accuracyPopups.clear();
circles.clear();
tapZones.clear();
((Game) Gdx.app.getApplicationListener()).setScreen(new ResultsScreen());
}
示例6: disposeOf
import com.badlogic.gdx.audio.Music; //導入方法依賴的package包/類
private void disposeOf(Music mus) {
if(mus == null)
return;;
if(mus.isPlaying())
mus.stop();
mus.dispose();
}
示例7: onCompletion
import com.badlogic.gdx.audio.Music; //導入方法依賴的package包/類
@Override
public void onCompletion(Music music) {
if (isABRepeatMode && !done) {
resetMarks();
if (hasMusic) {
theSong.pause();
theSong.setPosition(aPosition);
theSong.play();
lastmtime = theSong.getPosition();
time = lastmtime + world.delay;
timeSyncAcc = 0;
} else {
time = aPosition;
}
return;
}
if (hasMusic) {
music.dispose();
}
done = true;
if (this.largestCombo < this.combo) {
this.largestCombo = combo;
}
Results.bads = badCount;
Results.goods = goodCount;
Results.greats = greatCount;
Results.perfects = perfectCount;
Results.miss = missCount;
Results.combo = largestCombo;
Results.accuracy = calculateAccuracy();
Results.normalizedAccuracy = calculateNormalizedAccuracy();
accuracyMarkers.clear();
accuracyPopups.clear();
marks.clear();
tapZones.clear();
((Game) Gdx.app.getApplicationListener()).setScreen(new ResultsScreen());
}
示例8: removeMusic
import com.badlogic.gdx.audio.Music; //導入方法依賴的package包/類
public void removeMusic(String key) {
Music m = music.get(key);
if (m != null) {
music.remove(key);
m.dispose();
}
}
示例9: dispose
import com.badlogic.gdx.audio.Music; //導入方法依賴的package包/類
public void dispose() {
for (Music song : songs) {
song.dispose();
}
}