Group
Bases: pygame.sprite.Group
Container for multiple Entities.
Source code in robingame/objects/group.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
add(*entities)
Does the same thing as pygame's Group.add()
.
Only overriding this because pygame's typing was making the linter complain.
robingame/objects/group.py
11 12 13 14 15 16 |
|
draw(surface, debug=False)
Call .draw(surface, debug)
on all member Entities.
This is different from pygame's Group.draw()
in that it calls the Entity.draw()
method
(thus allowing the Entity to decide how to draw itself) instead of just blitting the
Entity's .image
onto the surface.
robingame/objects/group.py
24 25 26 27 28 29 30 31 32 33 34 35 |
|
kill()
Call .kill()
on all the entities in this group.
This is different from Group.empty()
.
robingame/objects/group.py
37 38 39 40 41 42 43 |
|
update(*args)
Call .update()
on all member Entities.
robingame/objects/group.py
18 19 20 21 22 |
|