本文整理汇总了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();
}
}