Advertisement
Guest User

zgqgqzegqz

a guest
Feb 17th, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. for (Light light : lights) {
  2.                     //centre the light
  3.                     int alphaW = (int)(alphaMap.getWidth() * light.scale);
  4.                     int alphaH = (int)(alphaMap.getHeight() * light.scale);
  5.                     int alphaX = (int)((light.x - alphaW/2f) - xscroll);
  6.                     int alphaY = (int)(light.y - alphaH/2f);
  7.                    
  8.                     if(alphaX > -((alphaW - 50) / 2 + arg0.getWidth() / 2) && alphaX < (alphaW + 50) / 2 + arg0.getWidth() / 2) {
  9.                         if(!SeeinLights.contains(light)) {
  10.                             SeeinLights.add(light);
  11.                         }
  12.                     } else {
  13.                         if(SeeinLights.contains(light)) {
  14.                             SeeinLights.remove(light);
  15.                         }
  16.                     }
  17.                 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement