本文整理汇总了Java中com.badlogic.gdx.LifecycleListener.pause方法的典型用法代码示例。如果您正苦于以下问题:Java LifecycleListener.pause方法的具体用法?Java LifecycleListener.pause怎么用?Java LifecycleListener.pause使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.LifecycleListener
的用法示例。
在下文中一共展示了LifecycleListener.pause方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: end
import com.badlogic.gdx.LifecycleListener; //导入方法依赖的package包/类
/** Called when the game loop has exited. */
protected void end () {
synchronized (lifecycleListeners) {
for (LifecycleListener listener : lifecycleListeners) {
listener.pause();
listener.dispose();
}
}
listener.pause();
listener.dispose();
if (audio != null) {
audio.dispose();
}
glfwReleaseCallbacks(graphics.window);
glfwTerminate();
if (forceExit) System.exit(-1);
}
示例2: end
import com.badlogic.gdx.LifecycleListener; //导入方法依赖的package包/类
/** Called when the game loop has exited. */
protected void end () {
synchronized (lifecycleListeners) {
for (LifecycleListener listener : lifecycleListeners) {
listener.pause();
listener.dispose();
}
}
listener.pause();
listener.dispose();
glfwTerminate();
if (forceExit) System.exit(-1);
}
示例3: pause
import com.badlogic.gdx.LifecycleListener; //导入方法依赖的package包/类
public void pause () {
if (appPaused) return;
appPaused = true;
Array<LifecycleListener> listeners = app.lifecycleListeners;
synchronized (listeners) {
for (LifecycleListener listener : listeners) {
listener.pause();
}
}
app.listener.pause();
}
示例4: willTerminate
import com.badlogic.gdx.LifecycleListener; //导入方法依赖的package包/类
final void willTerminate (UIApplication uiApp) {
Gdx.app.debug("IOSApplication", "disposed");
graphics.makeCurrent();
Array<LifecycleListener> listeners = lifecycleListeners;
synchronized (listeners) {
for (LifecycleListener listener : listeners) {
listener.pause();
}
}
listener.dispose();
Gdx.gl.glFlush();
}
示例5: stop
import com.badlogic.gdx.LifecycleListener; //导入方法依赖的package包/类
public void stop () {
if (!running) return;
running = false;
setGlobals();
Array<LifecycleListener> listeners = lifecycleListeners;
// To allow destroying of OpenGL textures during disposal.
if (canvas.isDisplayable()) {
makeCurrent();
} else {
error(logTag, "OpenGL context destroyed before application listener has had a chance to dispose of textures.");
}
synchronized (listeners) {
for (LifecycleListener listener : listeners) {
listener.pause();
listener.dispose();
}
}
listener.pause();
listener.dispose();
Gdx.app = null;
Gdx.graphics = null;
if (audio != null) {
audio.dispose();
Gdx.audio = null;
}
if (files != null) Gdx.files = null;
if (net != null) Gdx.net = null;
stopped();
}