本文整理汇总了Java中com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect.isComplete方法的典型用法代码示例。如果您正苦于以下问题:Java PooledEffect.isComplete方法的具体用法?Java PooledEffect.isComplete怎么用?Java PooledEffect.isComplete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect
的用法示例。
在下文中一共展示了PooledEffect.isComplete方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateAndRender
import com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect; //导入方法依赖的package包/类
public void updateAndRender(float delta, Batch batch) {
for (Entry<PooledEffect, GameObject> effectEntry : objects.entrySet()) {
float x = effectEntry.getValue().getLeft() + offsets.get(effectEntry.getValue()).x;
float y = effectEntry.getValue().getTop() + offsets.get(effectEntry.getValue()).y;
effectEntry.getKey().setPosition(x, y);
effectEntry.getKey().draw(batch, delta);
if (effectEntry.getKey().isComplete()) {
effectEntry.getKey().reset();
remove(effectEntry.getKey());
break;
}
}
for (PooledEffect single : singleEffects) {
single.draw(batch, delta);
if (single.isComplete()) {
single.free();
singleEffects.remove(single);
}
}
}
示例2: render
import com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect; //导入方法依赖的package包/类
@Override
public void render(float delta) {
// TODO: Make this UDACITY_BLUE instead
clearScreen(UDACITY_ORANGE);
batch.begin();
batch.draw(logo,
(Gdx.graphics.getWidth() - LOGO_WIDTH) / 2,
(Gdx.graphics.getHeight() - logoHeight) / 2,
LOGO_WIDTH,
logoHeight);
for (int i = effects.size - 1; i >= 0; i--) {
PooledEffect effect = effects.get(i);
effect.draw(batch, delta);
if (effect.isComplete()) {
effect.free();
effects.removeIndex(i);
}
}
batch.end();
}
示例3: render
import com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect; //导入方法依赖的package包/类
@Override
public void render(float delta) {
clearScreen(UDACITY_ORANGE);
batch.begin();
// TODO: Investigate the .draw() method on SpriteBatch
batch.draw(logo,
(Gdx.graphics.getWidth() - LOGO_WIDTH) / 2,
(Gdx.graphics.getHeight() - logoHeight) / 2,
LOGO_WIDTH,
logoHeight);
// TODO: Why are we iterating backwards?
for (int i = effects.size - 1; i >= 0; i--) {
PooledEffect effect = effects.get(i);
effect.draw(batch, delta);
if (effect.isComplete()) {
effect.free();
effects.removeIndex(i);
}
}
batch.end();
}
示例4: render
import com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect; //导入方法依赖的package包/类
@Override
public void render(float gameTime) {
for (int i = effects.size - 1; i >= 0; i--) {
PooledEffect effect = effects.get(i);
effect.draw(getGameService().getSpriteBatch(), gameTime);
if (effect.isComplete()) {
effect.free();
effects.removeIndex(i);
}
}
}
示例5: render
import com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect; //导入方法依赖的package包/类
@Override
public void render(float delta) {
// model.frame();
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
batch.begin();
// Update and draw effects:
PooledEffect effect = effects.get(effectIndex);
effect.draw(batch, delta);
if (effect.isComplete()) {
effect.free();
effects.removeIndex(effectIndex);
}
batch.end();
}