当前位置: 首页>>代码示例>>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;未经允许,请勿转载。