本文整理汇总了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;未经允许,请勿转载。 |
请发表评论