Revision a8c3ada7
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/examples/listener/ListenerRenderer.java | ||
---|---|---|
47 | 47 |
|
48 | 48 |
private long randomizeNewBubble() |
49 | 49 |
{ |
50 |
int radius = (int)((0.10f + 0.70f*mRnd.nextFloat())*bmpWidth); // pop up a bubble of size (radius,height)
|
|
50 |
int radius = (int)(( 0.10f + 0.70f*mRnd.nextFloat())*bmpWidth); // pop up a bubble of size (radius,height)
|
|
51 | 51 |
int height = (int)((-0.10f + 0.20f*mRnd.nextFloat())*bmpWidth); // |
52 |
int pointx = mRnd.nextInt( (int)(0.8f*bmpWidth)) + (int)(0.1f*bmpWidth); // at a random place on the bitmap (but not near the edge)
|
|
52 |
int pointx = mRnd.nextInt( (int)(0.8f*bmpWidth ))+ (int)(0.1f*bmpWidth ); // at a random place on the bitmap (but not near the edge)
|
|
53 | 53 |
int pointy = mRnd.nextInt( (int)(0.8f*bmpHeight))+ (int)(0.1f*bmpHeight); // |
54 | 54 |
int duration = 1000 + mRnd.nextInt(3000); // for anytime from 3 to 4 seconds |
55 | 55 |
|
... | ... | |
85 | 85 |
|
86 | 86 |
public void onSurfaceChanged(GL10 glUnused, int width, int height) |
87 | 87 |
{ |
88 |
water.abortAllEffects(EffectTypes.MATRIX.type);
|
|
88 |
water.abortEffects(EffectTypes.MATRIX);
|
|
89 | 89 |
|
90 | 90 |
if( bmpHeight/bmpWidth > height/width ) |
91 | 91 |
{ |
Also available in: Unified diff
Improve aborting Effects.