本文整理汇总了Java中com.watabou.noosa.audio.Music类的典型用法代码示例。如果您正苦于以下问题:Java Music类的具体用法?Java Music怎么用?Java Music使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Music类属于com.watabou.noosa.audio包,在下文中一共展示了Music类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onResume
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@Override
public void onResume() {
super.onResume();
now = 0;
SystemTime.tick();
SystemTime.updateLastActionTime();
view.onResume();
Music.INSTANCE.resume();
Sample.INSTANCE.resume();
if (doOnResume != null) {
doOnResume.run();
doOnResume = null;
}
}
示例2: onPause
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@Override
public void onPause() {
super.onPause();
paused = true;
if (scene != null) {
executeInGlThread(new Runnable() {
@Override
public void run() {
scene.pause();
}
});
Music.INSTANCE.pause();
Sample.INSTANCE.pause();
}
view.onPause();
Script.reset();
}
示例3: onDestroy
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@Override
public void onDestroy() {
super.onDestroy();
executeInGlThread(new Runnable() {
@Override
public void run() {
Music.INSTANCE.mute();
Sample.INSTANCE.reset();
if (scene != null) {
scene.destroy();
scene = null;
}
}
});
}
示例4: onResume
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@Override
public void onResume() {
super.onResume();
now = 0;
view.onResume();
Music.INSTANCE.resume();
Sample.INSTANCE.resume();
}
示例5: onPause
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@Override
public void onPause() {
super.onPause();
if (scene != null) {
scene.pause();
}
view.onPause();
Script.reset();
Music.INSTANCE.pause();
Sample.INSTANCE.pause();
}
示例6: onDestroy
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@Override
public void onDestroy() {
super.onDestroy();
destroyGame();
Music.INSTANCE.mute();
Sample.INSTANCE.reset();
}
示例7: onResume
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@Override
public void onResume() {
super.onResume();
now = 0;
view.onResume();
Music.INSTANCE.resume();
Sample.INSTANCE.resume();
}
示例8: onPause
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@Override
public void onPause() {
super.onPause();
if (scene != null) {
scene.pause();
}
view.onPause();
Script.reset();
Music.INSTANCE.pause();
Sample.INSTANCE.pause();
}
示例9: onDestroy
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@Override
public void onDestroy() {
super.onDestroy();
destroyGame();
Music.INSTANCE.mute();
Sample.INSTANCE.reset();
}
示例10: resume
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@Override
public void resume() {
now = 0;
Music.INSTANCE.resume();
Sample.INSTANCE.resume();
}
示例11: pause
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@Override
public void pause() {
if (scene != null) {
scene.pause();
}
Script.reset();
Music.INSTANCE.pause();
Sample.INSTANCE.pause();
}
示例12: dispose
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@Override
public void dispose() {
destroyGame();
Music.INSTANCE.mute();
Sample.INSTANCE.reset();
}
示例13: onCreate
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Override
protected void onCreate( Bundle savedInstanceState ) {
super.onCreate(savedInstanceState);
/* if (android.os.Build.VERSION.SDK_INT >= 19) {
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_FULLSCREEN |
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY );
}*/
updateImmersiveMode();
DisplayMetrics metrics = new DisplayMetrics();
instance.getWindowManager().getDefaultDisplay().getMetrics( metrics );
boolean landscape = metrics.widthPixels > metrics.heightPixels;
if (Preferences.INSTANCE.getBoolean( Preferences.KEY_LANDSCAPE, false ) != landscape) {
landscape( !landscape );
}
Music.INSTANCE.enable( music() );
Sample.INSTANCE.enable( soundFx() );
}
示例14: pause
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@Override
public void pause() {
if (scene != null) {
scene.pause();
}
Script.reset();
Music.INSTANCE.pause();
Sample.INSTANCE.pause();
}
示例15: resume
import com.watabou.noosa.audio.Music; //导入依赖的package包/类
@Override
public void resume() {
now = 0;
Music.INSTANCE.resume();
Sample.INSTANCE.resume();
}