Back to project page libgdx-demo-pax-britannica.
The source code is released under:
Copyright (c) 2010 Ben Abraham, Renaud B?dard, Henk Boom, Daniel Burton, Matthew Gallant Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated ...
If you think the Android project libgdx-demo-pax-britannica listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.swagner.paxbritannica.particlesystem; /*from w w w.j a v a2 s . c o m*/ import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.math.Vector2; import de.swagner.paxbritannica.Resources; public class BubbleParticleEmitter extends ParticleEmitter { public BubbleParticleEmitter() { super(); life = 2.5f; damping =1f; set(Resources.getInstance().bubble); } public void addParticle(Vector2 position) { addParticle(position, random.set(MathUtils.random() * 0.1f - 0.05f, 0.01f + MathUtils.random() * 0.05f) ,life, 1); } }