Java Code Examples for com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect#draw()
The following examples show how to use
com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect#draw() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UdacityScreen.java From ud405 with MIT License | 6 votes |
@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(); }
Example 2
Source File: UdacityScreen.java From ud406 with MIT License | 6 votes |
@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(); }