本文整理汇总了Java中com.badlogic.gdx.utils.DelayedRemovalArray类的典型用法代码示例。如果您正苦于以下问题:Java DelayedRemovalArray类的具体用法?Java DelayedRemovalArray怎么用?Java DelayedRemovalArray使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DelayedRemovalArray类属于com.badlogic.gdx.utils包,在下文中一共展示了DelayedRemovalArray类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Level
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
public Level() {
viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);
gigaGal = new GigaGal(new Vector2(50, 50), this);
platforms = new Array<Platform>();
enemies = new DelayedRemovalArray<Enemy>();
bullets = new DelayedRemovalArray<Bullet>();
explosions = new DelayedRemovalArray<Explosion>();
powerups = new DelayedRemovalArray<Powerup>();
exitPortal = new ExitPortal(new Vector2(200, 200));
gameOver = false;
victory = false;
score = 0;
}
示例2: newDelayedRemovalArray
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
/** @param values will be appended to the array.
* @return a new DelayedRemovalArray with the passed values.
* @param <Type> type of stored elements. */
public static <Type> DelayedRemovalArray<Type> newDelayedRemovalArray(final Iterable<? extends Type> values) {
final DelayedRemovalArray<Type> array = new DelayedRemovalArray<Type>();
for (final Type value : values) {
array.add(value);
}
return array;
}
示例3: Level
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
public Level(Viewport viewport) {
this.viewport = viewport;
gigaGal = new GigaGal(Constants.DEFAULT_SPAWN_LOCATION, this);
platforms = new Array<Platform>();
enemies = new DelayedRemovalArray<Enemy>();
bullets = new DelayedRemovalArray<Bullet>();
explosions = new DelayedRemovalArray<Explosion>();
powerups = new DelayedRemovalArray<Powerup>();
// TODO: Initialize the exit portal with its default location
exitPortal = new ExitPortal(Constants.EXIT_PORTAL_DEFAULT_LOCATION);
}
示例4: Level
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
public Level(Viewport viewport) {
this.viewport = viewport;
gigaGal = new GigaGal(Constants.DEFAULT_SPAWN_LOCATION, this);
platforms = new Array<Platform>();
enemies = new DelayedRemovalArray<Enemy>();
bullets = new DelayedRemovalArray<Bullet>();
explosions = new DelayedRemovalArray<Explosion>();
powerups = new DelayedRemovalArray<Powerup>();
exitPortal = new ExitPortal(Constants.EXIT_PORTAL_DEFAULT_LOCATION);
}
示例5: Level
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
public Level(Viewport viewport) {
this.viewport = viewport;
gigaGal = new GigaGal(Constants.DEFAULT_SPAWN_LOCATION, this);
platforms = new Array<Platform>();
enemies = new DelayedRemovalArray<Enemy>();
bullets = new DelayedRemovalArray<Bullet>();
explosions = new DelayedRemovalArray<Explosion>();
powerups = new DelayedRemovalArray<Powerup>();
}
示例6: create
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
@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>();
}
示例7: Level
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
public Level(Viewport viewport) {
this.viewport = viewport;
gigaGal = new GigaGal(Constants.DEFAULT_SPAWN_LOCATION, this);
platforms = new Array<Platform>();
enemies = new DelayedRemovalArray<Enemy>();
bullets = new DelayedRemovalArray<Bullet>();
explosions = new DelayedRemovalArray<Explosion>();
powerups = new DelayedRemovalArray<Powerup>();
// TODO: Initialize the exit portal with its default location
}
示例8: create
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
@Override
protected DelayedRemovalArray create (boolean ordered, int capacity, Class type) {
return new DelayedRemovalArray(ordered, capacity, type);
}
示例9: getEnemies
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
public DelayedRemovalArray<Enemy> getEnemies() {
return enemies;
}
示例10: initializeDebugLevel
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
private void initializeDebugLevel() {
gigaGal = new GigaGal(new Vector2(15, 40), this);
platforms = new Array<Platform>();
enemies = new DelayedRemovalArray<Enemy>();
platforms.add(new Platform(15, 100, 30, 20));
Platform enemyPlatform = new Platform(75, 90, 100, 65);
enemies.add(new Enemy(enemyPlatform));
platforms.add(enemyPlatform);
platforms.add(new Platform(35, 55, 50, 20));
platforms.add(new Platform(10, 20, 20, 9));
}
示例11: toDelayedRemoval
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
/** @param array will be copied.
* @return a new delayed removal array created with the passed array values.
* @param <Type> type of stored elements. */
public static <Type> DelayedRemovalArray<Type> toDelayedRemoval(final Array<? extends Type> array) {
return new DelayedRemovalArray<Type>(array);
}
示例12: init
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
public void init() {
icicleList = new DelayedRemovalArray<Icicle>(false, 100);
// TODO: Set icicles dodged count to zero
iciclesDodged = 0;
}
示例13: init
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
public void init() {
icicleList = new DelayedRemovalArray<Icicle>(false, 100);
iciclesDodged = 0;
}
示例14: init
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
public void init() {
icicleList = new DelayedRemovalArray<Icicle>(false, Constants.INITIAL_ICICLES_ARRAY_CAPACITY);
iciclesDodged = 0;
}
示例15: init
import com.badlogic.gdx.utils.DelayedRemovalArray; //导入依赖的package包/类
public void init() {
// TODO: Initialize the DelayedRemovalArray
icicleList = new DelayedRemovalArray<Icicle>(false, 100);
}