本文整理汇总了Java中com.badlogic.gdx.graphics.g2d.Animation.PlayMode.LOOP属性的典型用法代码示例。如果您正苦于以下问题:Java PlayMode.LOOP属性的具体用法?Java PlayMode.LOOP怎么用?Java PlayMode.LOOP使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.badlogic.gdx.graphics.g2d.Animation.PlayMode
的用法示例。
在下文中一共展示了PlayMode.LOOP属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: GigaGalAssets
public GigaGalAssets(TextureAtlas atlas) {
standingLeft = atlas.findRegion(Constants.STANDING_LEFT);
standingRight = atlas.findRegion(Constants.STANDING_RIGHT);
walkingLeft = atlas.findRegion(Constants.WALKING_LEFT_2);
walkingRight = atlas.findRegion(Constants.WALKING_RIGHT_2);
jumpingLeft = atlas.findRegion(Constants.JUMPING_LEFT);
jumpingRight = atlas.findRegion(Constants.JUMPING_RIGHT);
Array<AtlasRegion> walkingLeftFrames = new Array<AtlasRegion>();
walkingLeftFrames.add(atlas.findRegion(Constants.WALKING_LEFT_2));
walkingLeftFrames.add(atlas.findRegion(Constants.WALKING_LEFT_1));
walkingLeftFrames.add(atlas.findRegion(Constants.WALKING_LEFT_2));
walkingLeftFrames.add(atlas.findRegion(Constants.WALKING_LEFT_3));
walkingLeftAnimation = new Animation(Constants.WALK_LOOP_DURATION, walkingLeftFrames, PlayMode.LOOP);
Array<AtlasRegion> walkingRightFrames = new Array<AtlasRegion>();
walkingRightFrames.add(atlas.findRegion(Constants.WALKING_RIGHT_2));
walkingRightFrames.add(atlas.findRegion(Constants.WALKING_RIGHT_1));
walkingRightFrames.add(atlas.findRegion(Constants.WALKING_RIGHT_2));
walkingRightFrames.add(atlas.findRegion(Constants.WALKING_RIGHT_3));
walkingRightAnimation = new Animation(Constants.WALK_LOOP_DURATION, walkingRightFrames, PlayMode.LOOP);
}
示例2: GigaGalAssets
public GigaGalAssets(TextureAtlas atlas) {
standingLeft = atlas.findRegion(Constants.STANDING_LEFT);
standingRight = atlas.findRegion(Constants.STANDING_RIGHT);
walkingLeft = atlas.findRegion(Constants.WALKING_LEFT_2);
walkingRight = atlas.findRegion(Constants.WALKING_RIGHT_2);
jumpingLeft = atlas.findRegion(Constants.JUMPING_LEFT);
jumpingRight = atlas.findRegion(Constants.JUMPING_RIGHT);
// TODO: Create an Array of AtlasRegions to hold the walking left frames
Array<AtlasRegion> walkingLeftFrames = new Array<AtlasRegion>();
// TODO: Add the proper frames to the array
walkingLeftFrames.add(atlas.findRegion(Constants.WALKING_LEFT_2));
walkingLeftFrames.add(atlas.findRegion(Constants.WALKING_LEFT_1));
walkingLeftFrames.add(atlas.findRegion(Constants.WALKING_LEFT_2));
walkingLeftFrames.add(atlas.findRegion(Constants.WALKING_LEFT_3));
// TODO: Create the walking left animation
walkingLeftAnimation = new Animation(Constants.WALK_LOOP_DURATION, walkingLeftFrames, PlayMode.LOOP);
// TODO: Do the same with the walking right frames
Array<AtlasRegion> walkingRightFrames = new Array<AtlasRegion>();
walkingRightFrames.add(atlas.findRegion(Constants.WALKING_RIGHT_2));
walkingRightFrames.add(atlas.findRegion(Constants.WALKING_RIGHT_1));
walkingRightFrames.add(atlas.findRegion(Constants.WALKING_RIGHT_2));
walkingRightFrames.add(atlas.findRegion(Constants.WALKING_RIGHT_3));
walkingRightAnimation = new Animation(Constants.WALK_LOOP_DURATION, walkingRightFrames, PlayMode.LOOP);
}
示例3: loops
public boolean loops() {
return rawAnimation.getPlayMode() == PlayMode.LOOP;
}