当前位置: 首页>>代码示例>>Java>>正文


Java LifecycleListener.dispose方法代码示例

本文整理汇总了Java中com.badlogic.gdx.LifecycleListener.dispose方法的典型用法代码示例。如果您正苦于以下问题:Java LifecycleListener.dispose方法的具体用法?Java LifecycleListener.dispose怎么用?Java LifecycleListener.dispose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.badlogic.gdx.LifecycleListener的用法示例。


在下文中一共展示了LifecycleListener.dispose方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
 
开发者ID:Arcnor,项目名称:gdx-backend-jglfw,代码行数:18,代码来源:JglfwApplication.java

示例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);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:14,代码来源:JglfwApplication.java

示例3: 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();
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:13,代码来源:IOSApplication.java

示例4: 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();
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:38,代码来源:LwjglAWTCanvas.java


注:本文中的com.badlogic.gdx.LifecycleListener.dispose方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。