Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean fancyGraphics = true;
- BufferedImage fancyLightSurface;
- BufferedImage fastLightSurface;
- BufferedImage lightSurface;
- BufferedImage fastLight;
- BufferedImage fancyLight;
- BufferedImage light;
- Graphics2D lightG2D;
- //constructor
- fancyLightSurface = game.createImage(608,480,Transparency.TRANSLUCENT);
- fastLightSurface = game.createImage(608, 480, Transparency.BITMASK);
- lightSurface = fancyLightSurface;
- lightG2D = (Graphics2D)lightSurface.getGraphics();
- fancyLight = importImage("resources/alphalight.png",Transparency.TRANSLUCENT);
- fastLight = importImage("resources/alphalight.png",Transparency.BITMASK);
- light = fancylight;
- //when quality is toggled
- game.fancygraphics = !game.fancygraphics;
- if (game.fancygraphics){
- lightSurface = fancyLightSurface;
- game.light = game.fancyLight;
- }else{
- lightSurface = fastLightSurface;
- game.light = game.fastLight;
- }
- lightG2D = (Graphics2D)lightSurface.getGraphics();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement