Answers for "how to remove object from class pygame"

-1

how to remove object from class pygame

A = []
while gameLoop:
...

a = Asteroid()
A.append(a)`

for i in A:
    i.move()
    if i.pos > dWidth:
         del i  # This doesn't remove the object
Posted by: Guest on May-22-2020

Code answers related to "how to remove object from class pygame"

Browse Popular Code Answers by Language