cocos2d/cocos2d-swift — pull request #1055 by thayerandrews (2014-11-04 23:54:31+00:00)
Title: CCEffectLighting - Add automatic light collection

Automatically determine which lights effect which nodes Instead of forcing the user to manually manage this.

- Light effects and light nodes can be arranged into groups via arrays of strings that are converted into bit masks.
- If there is an intersection between the groups of a light effect and a light node then the light node influences the effect.
- The scene owns a light collection which tracks all lights. Light nodes add themselves to the collection upon entry to the scene and remove themselves on exit.
- When a node is rendered with a lighting effect, the light collection is queried to determine the nearest lights.