• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java AsyncExecutor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.badlogic.gdx.utils.async.AsyncExecutor的典型用法代码示例。如果您正苦于以下问题:Java AsyncExecutor类的具体用法?Java AsyncExecutor怎么用?Java AsyncExecutor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AsyncExecutor类属于com.badlogic.gdx.utils.async包,在下文中一共展示了AsyncExecutor类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: AssetManager

import com.badlogic.gdx.utils.async.AsyncExecutor; //导入依赖的package包/类
/** Creates a new AssetManager with all default loaders. */
public AssetManager (FileHandleResolver resolver) {
	setLoader(BitmapFont.class, new BitmapFontLoader(resolver));
	setLoader(Music.class, new MusicLoader(resolver));
	setLoader(Pixmap.class, new PixmapLoader(resolver));
	setLoader(Sound.class, new SoundLoader(resolver));
	setLoader(TextureAtlas.class, new TextureAtlasLoader(resolver));
	setLoader(Texture.class, new TextureLoader(resolver));
	setLoader(Skin.class, new SkinLoader(resolver));
	setLoader(ParticleEffect.class, new ParticleEffectLoader(resolver));
	setLoader(PolygonRegion.class, new PolygonRegionLoader(resolver));
	setLoader(I18NBundle.class, new I18NBundleLoader(resolver));
	setLoader(Model.class, ".g3dj", new G3dModelLoader(new JsonReader(), resolver));
	setLoader(Model.class, ".g3db", new G3dModelLoader(new UBJsonReader(), resolver));
	setLoader(Model.class, ".obj", new ObjLoader(resolver));
	executor = new AsyncExecutor(1);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:18,代码来源:AssetManager.java


示例2: report

import com.badlogic.gdx.utils.async.AsyncExecutor; //导入依赖的package包/类
public void report() {
    try {
        AsyncExecutor asyncExecutor = new AsyncExecutor(1);
        asyncExecutor.submit(this);
        asyncExecutor.dispose();
        asyncExecutor.dispose();
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:UnderwaterApps,项目名称:submarine,代码行数:11,代码来源:StatsReporter.java


示例3: AssetLoadingTask

import com.badlogic.gdx.utils.async.AsyncExecutor; //导入依赖的package包/类
public AssetLoadingTask (AssetManager manager, AssetDescriptor assetDesc, AssetLoader loader, AsyncExecutor threadPool) {
	this.manager = manager;
	this.assetDesc = assetDesc;
	this.loader = loader;
	this.executor = threadPool;
	startTime = manager.log.getLevel() == Logger.DEBUG ? TimeUtils.nanoTime() : 0;
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:8,代码来源:AssetLoadingTask.java


示例4: create

import com.badlogic.gdx.utils.async.AsyncExecutor; //导入依赖的package包/类
@Override
public void create() {
	super.create();

	executor = new AsyncExecutor(1);

	// prepare rendering aids
	shapeRenderer = new ShapeRenderer();

	Gdx.input.setInputProcessor(this);
}
 
开发者ID:e-ucm,项目名称:ead,代码行数:12,代码来源:ShapeEditor.java


示例5: JavityNetJavaImpl

import com.badlogic.gdx.utils.async.AsyncExecutor; //导入依赖的package包/类
public JavityNetJavaImpl () {
	asyncExecutor = new AsyncExecutor(10);
	connections = new ObjectMap<HttpRequest, HttpURLConnection>();
	listeners = new ObjectMap<HttpRequest, HttpResponseListener>();
}
 
开发者ID:Radomiej,项目名称:JavityEngine,代码行数:6,代码来源:JavityNetJavaImpl.java


示例6: create

import com.badlogic.gdx.utils.async.AsyncExecutor; //导入依赖的package包/类
@Override
public void create() {
	super.create();

	executor = new AsyncExecutor(1);

	// create a string of generally-overlapping polygons, will draw in
	// blue
	GeoTester.randomPolys(3, 40, 80, new Vector2(100, 300), blue);
	float s = 10;
	Polygon p0 = new Polygon(new float[] {
			// north-west, low, north-east
			0, 3 * s, 0, 2 * s, 2 * s, 0, 3 * s, 0, 4.5f * s, 2 * s, 6 * s,
			0, 7 * s, 0, 9 * s, 2 * s, 9 * s, 3 * s,
			// north-east, high, north-west
			8 * s, 3 * s, 6.5f * s, 1 * s, 5 * s, 3 * s, 4 * s, 3 * s,
			2.5f * s, s, 1 * s, 3 * s });
	blue.add(p0);
	// merge them into a single polygon, will draw in red
	for (Polygon bp : blue) {
		GeometryUtils.merge(geo, bp);
	}
	Geometry collapsed = GeometryUtils.collapse(geo);
	Polygon p = GeometryUtils.jtsCoordsToGdx(collapsed.getCoordinates());
	red.add(p);

	triangles = GeometryUtils.triangulate(collapsed);
	Gdx.app.error("GeoTester", "ready to display triangles worth "
			+ triangles.length + " vertices");

	// use the polygon to clip a randomly-generated texture
	textureSolid = new Texture(GeoTester.randomPixmap(100, 100, null),
			false);

	PolygonRegion polyReg = new PolygonRegion(new TextureRegion(
			textureSolid), p.getVertices(), triangles);
	poly = new PolygonSprite(polyReg);
	poly.setOrigin(p.getVertices()[0], p.getVertices()[1]);
	polyBatch = new PolygonSpriteBatch();

	// prepare rendering aids
	shapeRenderer = new ShapeRenderer();

	Gdx.input.setInputProcessor(this);
}
 
开发者ID:e-ucm,项目名称:ead,代码行数:46,代码来源:TexturedShapeEditor.java


示例7: BackgroundExecutor

import com.badlogic.gdx.utils.async.AsyncExecutor; //导入依赖的package包/类
public BackgroundExecutor() {
	tasks = new Array<Execution>();
	this.asyncExecutor = new AsyncExecutor(Math.max(1, Runtime.getRuntime()
			.availableProcessors() - 1));
}
 
开发者ID:e-ucm,项目名称:ead,代码行数:6,代码来源:BackgroundExecutor.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java V3TBSCertificateGenerator类代码示例发布时间:2022-05-23
下一篇:
Java DataPacketProvider类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap