|
|
|
@ -66,6 +66,12 @@ public class LevelRenderer extends Object{ |
|
|
|
|
staggerOffsetX*=-1; |
|
|
|
|
staggerTimer=staggerJitterWaitTime; |
|
|
|
|
} |
|
|
|
|
if (RabiClone.player!=null&&RabiClone.player.isUnderwater()) { |
|
|
|
|
updateRipples(updateMult); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void updateRipples(double updateMult) { |
|
|
|
|
if ((nextRipple-=updateMult)<0) { |
|
|
|
|
if (Math.random()*RIPPLE_CHANCE<1) { |
|
|
|
|
int selectedIndex=(int)(Math.random()*ripples.length); |
|
|
|
@ -132,7 +138,13 @@ public class LevelRenderer extends Object{ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (RabiClone.player!=null) { |
|
|
|
|
|
|
|
|
|
if (RabiClone.player.isUnderwater()) { |
|
|
|
|
drawRipples(p); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Draw_Text(4,4,new String(RabiClone.player.getYVelocity()),Font.PROFONT_12); |
|
|
|
|
Draw_Text(4,4+Font.PROFONT_12.getGlyphHeight(),new String(RabiClone.scaleTime),Font.PROFONT_12); |
|
|
|
|
} |
|
|
|
@ -178,7 +190,9 @@ public class LevelRenderer extends Object{ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void drawRipples(byte[] p) { |
|
|
|
|
for (int i=0;i<ripples.length;i++) { |
|
|
|
|
if (ripples[i]!=0) { |
|
|
|
|
for (int y=-MAX_RIPPLE_SIZE/2;y<MAX_RIPPLE_SIZE/2;y++) { |
|
|
|
|