(Graphics g, boolean terrainReversed)
| 350 | } |
| 351 | |
| 352 | private void drawFunction(Graphics g, boolean terrainReversed) |
| 353 | { |
| 354 | if(graphwar.getGameData().isDrawingFunction()) |
| 355 | { |
| 356 | boolean funcReversed = graphwar.getGameData().isFunctionReversed(); |
| 357 | drawFunctionImage(functionGraphics, (funcReversed || terrainReversed) && !(funcReversed && terrainReversed)); |
| 358 | |
| 359 | Graphics2D g2d = (Graphics2D)g; |
| 360 | |
| 361 | if(graphwar.getGameData().isExploding()) |
| 362 | { |
| 363 | float alpha = 1.0f - ((float)graphwar.getGameData().getTimeExploding())/Constants.FUNC_FADE_TIME; |
| 364 | |
| 365 | if(alpha < 0) |
| 366 | { |
| 367 | alpha = 0; |
| 368 | } |
| 369 | |
| 370 | g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha)); |
| 371 | } |
| 372 | |
| 373 | g2d.drawImage(functionImage, 0, 0, null); |
| 374 | |
| 375 | g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f)); |
| 376 | |
| 377 | repaintBack = true; |
| 378 | } |
| 379 | } |
| 380 | |
| 381 | |
| 382 | private void drawExplosion(Graphics g, boolean terrainReversed) |
no test coverage detected