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

Java SkeletonRenderer类代码示例

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

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



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

示例1: SkeletonActorPool

import com.esotericsoftware.spine.SkeletonRenderer; //导入依赖的package包/类
public SkeletonActorPool (SkeletonRenderer renderer, SkeletonData skeletonData, AnimationStateData stateData,
	int initialCapacity, int max) {
	super(initialCapacity, max);

	this.renderer = renderer;
	this.skeletonData = skeletonData;
	this.stateData = stateData;

	obtained = new Array(false, initialCapacity);

	skeletonPool = new Pool<Skeleton>(initialCapacity, max) {
		protected Skeleton newObject () {
			return new Skeleton(SkeletonActorPool.this.skeletonData);
		}

		protected void reset (Skeleton skeleton) {
			skeleton.setColor(Color.WHITE);
			skeleton.setFlip(false, false);
			skeleton.setSkin((Skin)null);
			skeleton.setSkin(SkeletonActorPool.this.skeletonData.getDefaultSkin());
			skeleton.setToSetupPose();
		}
	};

	statePool = new Pool<AnimationState>(initialCapacity, max) {
		protected AnimationState newObject () {
			return new AnimationState(SkeletonActorPool.this.stateData);
		}

		protected void reset (AnimationState state) {
			state.clearTracks();
			state.clearListeners();
		}
	};
}
 
开发者ID:laurencegw,项目名称:jenjin,代码行数:36,代码来源:SkeletonActorPool.java


示例2: RenderingSystem

import com.esotericsoftware.spine.SkeletonRenderer; //导入依赖的package包/类
public RenderingSystem() {
	super();
	
	this.sortedEntities = new Array<Entity>(100);
	this.batch = new SpriteBatch();
	this.camera = Env.game.getCamera();
	this.viewport = Env.game.getViewport();
	this.uiCamera = Env.game.getUICamera();
	this.uiViewport = Env.game.getUIViewport();
	this.sorter = new DepthSorter();
	this.shapeRenderer = new ShapeRenderer();
	this.box2DRenderer = new Box2DDebugRenderer(Env.drawBodies,
												Env.drawJoints,
												Env.drawABBs,
												Env.drawInactiveBodies,
												Env.drawVelocities,
												Env.drawContacts);
	
	this.particleFrameBuffer = new FrameBuffer(Pixmap.Format.RGBA8888, Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), false);
	this.particleRegion = new TextureRegion(particleFrameBuffer.getColorBufferTexture());
	this.particleRegion.flip(false, true);
	
	this.skeletonRenderer = new SkeletonRenderer();
	
	if (Env.debug) {
		debugFont = Env.game.getAssets().get("data/ui/default.fnt", BitmapFont.class);
	}
}
 
开发者ID:saltares,项目名称:sioncore,代码行数:29,代码来源:RenderingSystem.java


示例3: retrieveAssets

import com.esotericsoftware.spine.SkeletonRenderer; //导入依赖的package包/类
@Override
public void retrieveAssets() {
	renderer = new SkeletonRenderer();
	renderer.setPremultipliedAlpha(false);
	bounds = new SkeletonBounds();

	for (String key : sourceCache.keySet()) {
		if (sourceCache.get(key).refCounter > 0)
			retrieveSource(key, ((SkeletonCacheEntry) sourceCache.get(key)).atlas);
	}

	if (currentAnimation != null) {
		SkeletonCacheEntry entry = (SkeletonCacheEntry) sourceCache.get(currentAnimation.source);
		currentSource = entry;

		// Stop events to avoid event trigger
		boolean prevEnableEvents = eventsEnabled;

		eventsEnabled = false;
		setCurrentAnimation();
		eventsEnabled = prevEnableEvents;

	} else if (initAnimation != null) {
		startAnimation(initAnimation, Tween.Type.SPRITE_DEFINED, 1, null);
	}

	setSkin(skin);
	computeBbox();
}
 
开发者ID:bladecoder,项目名称:bladecoder-adventure-engine,代码行数:30,代码来源:SpineRenderer.java


示例4: initialize

import com.esotericsoftware.spine.SkeletonRenderer; //导入依赖的package包/类
@Override
protected void initialize () {
	batch = renderBatchingSystem.getBatch();
	if (batch instanceof PolygonSpriteBatch) {
		skeletonRenderer = new SkeletonMeshRenderer();
	} else {
		skeletonRenderer = new SkeletonRenderer();
	}
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:10,代码来源:SpineRenderSystem.java


示例5: RenderSystem

import com.esotericsoftware.spine.SkeletonRenderer; //导入依赖的package包/类
public RenderSystem(SpriteBatch batch){
    super(Families.RENDERABLE);
    this.batch = batch;
    renderer = new SkeletonRenderer<>();
    renderer.setPremultipliedAlpha(true);
}
 
开发者ID:JoakimRW,项目名称:ExamensArbeteTD,代码行数:7,代码来源:RenderSystem.java


示例6: SkeletonActor

import com.esotericsoftware.spine.SkeletonRenderer; //导入依赖的package包/类
public SkeletonActor (SkeletonRenderer renderer, Skeleton skeleton, AnimationState state) {
	this.renderer = renderer;
	this.skeleton = skeleton;
	this.state = state;
}
 
开发者ID:laurencegw,项目名称:jenjin,代码行数:6,代码来源:SkeletonActor.java


示例7: getRenderer

import com.esotericsoftware.spine.SkeletonRenderer; //导入依赖的package包/类
public SkeletonRenderer getRenderer () {
	return renderer;
}
 
开发者ID:laurencegw,项目名称:jenjin,代码行数:4,代码来源:SkeletonActor.java


示例8: setRenderer

import com.esotericsoftware.spine.SkeletonRenderer; //导入依赖的package包/类
public void setRenderer (SkeletonRenderer renderer) {
	this.renderer = renderer;
}
 
开发者ID:laurencegw,项目名称:jenjin,代码行数:4,代码来源:SkeletonActor.java


示例9: RenderingSystem

import com.esotericsoftware.spine.SkeletonRenderer; //导入依赖的package包/类
public RenderingSystem(Viewport viewport,
					   Rectangle cameraFocusRect,
					   Vector2 cameraTarget,
					   Stage stage,
					   World world,
					   RayHandler rayHandler) {
	super(Family.all(RootComponent.class, NodeComponent.class).get());
	
	logger.info("initialize");
	
	this.viewport = viewport;
	this.cameraFocusRect = cameraFocusRect;
	this.cameraTarget = cameraTarget;
	this.stage = stage;
	this.world = world;
	this.rayHandler = rayHandler;
	
	//batch = new SpriteBatch();
	batch = new PolygonSpriteBatch();
	
	shapeRenderer = new ShapeRenderer();
	
	boolean drawBodies = true;
	boolean drawJoints = true;
	boolean drawABBs = true;
	boolean drawInactiveBodies = true;
	boolean drawVelocities = true;
	boolean drawContacts = true;
	box2DRenderer = new Box2DDebugRenderer(
		drawBodies,
		drawJoints,
		drawABBs,
		drawInactiveBodies,
		drawVelocities,
		drawContacts
	);
	
	spineRenderer = new SkeletonRenderer();
	spineDebugRenderer = new SkeletonRendererDebug();
	
	renderable = Family.all(
		NodeComponent.class,
		TransformComponent.class,
		SizeComponent.class
	).one(
		TextureComponent.class,
		ParticleComponent.class,
		SpineComponent.class
	).get();

}
 
开发者ID:saltares,项目名称:libgdxjam,代码行数:52,代码来源:RenderingSystem.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java MetadataCollection类代码示例发布时间:2022-05-23
下一篇:
Java RandomValue类代码示例发布时间: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