當前位置: 首頁>>代碼示例>>Java>>正文


Java Music.dispose方法代碼示例

本文整理匯總了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();
            }
        }
    }
}
 
開發者ID:Inari-Soft,項目名稱:inari-firefly-libGDX,代碼行數:17,代碼來源:GdxAudioImpl.java

示例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);
}
 
開發者ID:heyzqt,項目名稱:libGdx-xiyou,代碼行數:8,代碼來源:AssetManager.java

示例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();
    }
}
 
開發者ID:Mignet,項目名稱:Inspiration,代碼行數:10,代碼來源:AudioManager.java

示例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();
}
 
開發者ID:Inari-Soft,項目名稱:inari-firefly-libGDX,代碼行數:13,代碼來源:GdxAudioImpl.java

示例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());
}
 
開發者ID:kbz,項目名稱:SSTrain,代碼行數:40,代碼來源:WorldController.java

示例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();
}
 
開發者ID:kbz,項目名稱:SSTrain,代碼行數:10,代碼來源:Crossfader.java

示例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());
}
 
開發者ID:kbz,項目名稱:SIFTrain,代碼行數:40,代碼來源:WorldController.java

示例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();
    }
}
 
開發者ID:awwong1,項目名稱:BlockBunny,代碼行數:8,代碼來源:Content.java

示例9: dispose

import com.badlogic.gdx.audio.Music; //導入方法依賴的package包/類
public void dispose() {
    for (Music song : songs) {
        song.dispose();
    }
}
 
開發者ID:vs-slavchev,項目名稱:Virtual-Evil,代碼行數:6,代碼來源:MusicManager.java


注:本文中的com.badlogic.gdx.audio.Music.dispose方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。