projects
/
tabakrolletjie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ctpug.org.za:tabakrolletjie
[tabakrolletjie.git]
/
tabakrolletjie
/
lights.py
diff --git
a/tabakrolletjie/lights.py
b/tabakrolletjie/lights.py
index 54da531db68de8df8d3d7e9ca7333c10b4e2aa5f..ff7035abb0cfe09ceafa09ef344907b29114e5d5 100644
(file)
--- a/
tabakrolletjie/lights.py
+++ b/
tabakrolletjie/lights.py
@@
-74,7
+74,12
@@
class LightManager(object):
for light in self._lights:
light.add(self._space)
for light in self._lights:
light.add(self._space)
- def nearest(self, pos, surfpos=False, max_distance=1.0):
+ def toggle_nearest(self, *args, **kw):
+ light = self.nearest(*args, **kw)
+ if light:
+ light.toggle()
+
+ def nearest(self, pos, surfpos=True, max_distance=1.0):
if surfpos:
surface = pygame.display.get_surface()
pos = pymunk.pygame_util.from_pygame(pos, surface)
if surfpos:
surface = pygame.display.get_surface()
pos = pymunk.pygame_util.from_pygame(pos, surface)