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


Java PooledEffect.isComplete方法代码示例

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

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

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

示例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);
        }
	}
}
 
开发者ID:game-libgdx-unity,项目名称:GDX-Engine,代码行数:12,代码来源:ParticleEffectManager.java

示例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();
}
 
开发者ID:tjumyk,项目名称:touhou-java,代码行数:16,代码来源:ParticleScreen.java


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