Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (Light light : lights) {
- //centre the light
- int alphaW = (int)(alphaMap.getWidth() * light.scale);
- int alphaH = (int)(alphaMap.getHeight() * light.scale);
- int alphaX = (int)((light.x - alphaW/2f) - xscroll);
- int alphaY = (int)(light.y - alphaH/2f);
- if(alphaX > -((alphaW - 50) / 2 + arg0.getWidth() / 2) && alphaX < (alphaW + 50) / 2 + arg0.getWidth() / 2) {
- if(!SeeinLights.contains(light)) {
- SeeinLights.add(light);
- }
- } else {
- if(SeeinLights.contains(light)) {
- SeeinLights.remove(light);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement