libgdx / box2dlights

Fork of box2dlights by Kalle Hamalainen
Apache License 2.0
257 stars 82 forks source link

lightList in RayHandler is not accessible #97

Closed lampione closed 8 years ago

lampione commented 8 years ago

The editor keep marking as error the usage of lightList with the following message:

'lightList' is not public in 'box2dLight.RayHandler'. Cannot be accessed from outside package. the project won't build until I comment out the line.

I'm using version 1.4 with gradle

rinold commented 8 years ago

This is done intentionally, manual modification of this list might lead to issues. Could you please provide the reason why you need access to this list?

lampione commented 8 years ago

I wanted to get a valid reference to all the lights. Simply. That's not a big deal. Thank you!

rinold commented 8 years ago

Actually this list contains only active lights, valid but disabled lights will not be in it. Also they could be moved from one list to another, so better to store needed lights in your own code.

nanodeath commented 7 years ago

I would like something like this, too. Would it possibly make sense to implement something like com.badlogic.ashley.core.Engine's addEntityListener method? (and removeEntityListener) That way it'd be easy to "subscribe" to additions, removals, that sort of thing, and maintain a separate list if desired there.