Using Pygame.sprite.spritecollideany Python
I am new to python programming, and I am practicing by making a Alien Invasion game. This is a classic game configuration, there are rows of aliens you have to shot down before the
Solution 1:
Read Pygame doc: pygame.sprite.spritecollideany()
This function expects single sprite as first argument, and group as second argument but you use aliens
which is group as first argument, and ship which is sprite as second argument.
You have to change order of arguments.
BTW: next time simply use print()
- it is most popular method (if you don't know how to debug) to check what you have in variables and see what is wrong.
Post a Comment for "Using Pygame.sprite.spritecollideany Python"