float w1 = w / 16f;
float h1 = h / 16f;
float h2;
if (img3 != null) {
Graphics g = img1.getGraphics();
Graphics.setCurrent(g);
h2= h1 * t*2;
if(h2>h1)h2=h1;
for (int r = 0; r < 16; r++) {
for (int c = 0; c < 8; c++) {
float x = (w1) * (c * 2 + r % 2);
float y = (h1) * r;
g.drawImage(img3, x, y, x + w1, y + h2, x, y, x + w1, y
+ h2);
}
}
if (t > 0.5f){
h2= h1 * (t-0.5f)*2;
for (int r = 0; r < 16; r++) {
for (int c = 0; c < 8; c++) {
float x = (w1) * (c * 2 + (r+1)%2);
float y = (h1) * r;
g.drawImage(img3, x, y, x + w1, y + h2, x, y, x + w1, y
+ h2);
}
}
}
g.flush();
}
}