projects
/
koperkapel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
811c3d5
)
Make layers iterable.
author
Simon Cross
<hodgestar@gmail.com>
Wed, 2 Mar 2016 21:53:03 +0000
(23:53 +0200)
committer
Simon Cross
<hodgestar@gmail.com>
Wed, 2 Mar 2016 21:53:03 +0000
(23:53 +0200)
koperkapel/scenes/base.py
patch
|
blob
|
history
diff --git
a/koperkapel/scenes/base.py
b/koperkapel/scenes/base.py
index fd53f817b9cc6b3fade5a0b617f42a90e1f1e84f..16353d597e607f3a96ecdd1635c971362babdf29 100644
(file)
--- a/
koperkapel/scenes/base.py
+++ b/
koperkapel/scenes/base.py
@@
-116,6
+116,9
@@
class Layer:
self.name = name
self.actors = []
+ def __iter__(self):
+ return iter(self.actors)
+
def add(self, actor):
self.actors.append(actor)
return actor
@@
-154,7
+157,7
@@
class Actors:
def draw(self, screen):
for lvl, name in self._ordered_layers:
- for actor in self._layers[name]
.actors
:
+ for actor in self._layers[name]:
actor.draw() # TODO: allow an option screen to be passed in