当前位置: 首页>>代码示例>>Java>>正文


Java PlayMode.NORMAL属性代码示例

本文整理汇总了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);
        }
 
开发者ID:udacity,项目名称:ud406,代码行数:10,代码来源:Assets.java

示例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);
        }
 
开发者ID:udacity,项目名称:ud406,代码行数:14,代码来源:Assets.java

示例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>();

}
 
开发者ID:udacity,项目名称:ud406,代码行数:31,代码来源:Animations.java

示例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>();

}
 
开发者ID:udacity,项目名称:ud406,代码行数:31,代码来源:Animations.java


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