本文整理汇总了Java中com.badlogic.gdx.graphics.g2d.Animation.PlayMode.NORMAL属性的典型用法代码示例。如果您正苦于以下问题:Java PlayMode.NORMAL属性的具体用法?Java PlayMode.NORMAL怎么用?Java PlayMode.NORMAL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.badlogic.gdx.graphics.g2d.Animation.PlayMode
的用法示例。
在下文中一共展示了PlayMode.NORMAL属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ExplosionAssets
public ExplosionAssets(TextureAtlas atlas) {
Array<AtlasRegion> explosionRegions = new Array<AtlasRegion>();
explosionRegions.add(atlas.findRegion(Constants.EXPLOSION_LARGE));
explosionRegions.add(atlas.findRegion(Constants.EXPLOSION_MEDIUM));
explosionRegions.add(atlas.findRegion(Constants.EXPLOSION_SMALL));
explosion = new Animation(Constants.EXPLOSION_DURATION / explosionRegions.size,
explosionRegions, PlayMode.NORMAL);
}
示例2: ExplosionAssets
public ExplosionAssets(TextureAtlas atlas) {
// TODO: Populate the explosion animation
// First find the appropriate AtlasRegions
// Then pack them into an animation with the correct frame duration
Array<AtlasRegion> explosionRegions = new Array<AtlasRegion>();
explosionRegions.add(atlas.findRegion(Constants.EXPLOSION_LARGE));
explosionRegions.add(atlas.findRegion(Constants.EXPLOSION_MEDIUM));
explosionRegions.add(atlas.findRegion(Constants.EXPLOSION_SMALL));
explosion = new Animation(Constants.EXPLOSION_DURATION / explosionRegions.size,
explosionRegions, PlayMode.NORMAL);
}
示例3: create
@Override
public void create() {
batch = new SpriteBatch();
viewport = new ExtendViewport(100, 100);
// TODO: Set startTime using TimeUtils.nanoTime()
startTime = TimeUtils.nanoTime();
Array<TextureRegion> walkLoopTextures = new Array<TextureRegion>();
// TODO: Add walk-1-right.png to walkLoopTextures
walkLoopTextures.add(new TextureRegion(new Texture("walk-1-right.png")));
// TODO: Add walk-2-right.png to walkLoopTextures
walkLoopTextures.add(new TextureRegion(new Texture("walk-2-right.png")));
// TODO: Add walk-3-right.png to walkLoopTextures
walkLoopTextures.add(new TextureRegion(new Texture("walk-3-right.png")));
// TODO: Initialize walkLoop with a new animation in LOOP_PINGPONG mode
// Use WALK_LOOP_FRAME_DURATION
walkLoop = new Animation(WALK_LOOP_FRAME_DURATION, walkLoopTextures, PlayMode.LOOP_PINGPONG);
Array<TextureRegion> explosionTextures = new Array<TextureRegion>();
explosionTextures.add(new TextureRegion(new Texture("explosion-large.png")));
explosionTextures.add(new TextureRegion(new Texture("explosion-medium.png")));
explosionTextures.add(new TextureRegion(new Texture("explosion-small.png")));
explosion = new Animation(EXPLOSION_FRAME_DURATION, explosionTextures, PlayMode.NORMAL);
explosions = new DelayedRemovalArray<OneShotAnimation>();
}
示例4: create
@Override
public void create() {
batch = new SpriteBatch();
viewport = new ExtendViewport(100, 100);
// TODO: Set startTime using TimeUtils.nanoTime()
Array<TextureRegion> walkLoopTextures = new Array<TextureRegion>();
// TODO: Add walk-1-right.png to walkLoopTextures
// TODO: Add walk-2-right.png to walkLoopTextures
// TODO: Add walk-3-right.png to walkLoopTextures
// TODO: Initialize walkLoop with a new animation in LOOP_PINGPONG mode
// Use WALK_LOOP_FRAME_DURATION
Array<TextureRegion> explosionTextures = new Array<TextureRegion>();
explosionTextures.add(new TextureRegion(new Texture("explosion-large.png")));
explosionTextures.add(new TextureRegion(new Texture("explosion-medium.png")));
explosionTextures.add(new TextureRegion(new Texture("explosion-small.png")));
explosion = new Animation(EXPLOSION_FRAME_DURATION, explosionTextures, PlayMode.NORMAL);
explosions = new DelayedRemovalArray<OneShotAnimation>();
}