I cant figure out how to randomly spawn in objects and make them wait despawn after a period of time, or when my sprite touches the object it despawns.
I tried adding in a import random but not sure what to do next
randomPos = 0 waitTime = 0
randomPos = random.randint(0,900)
global randomPos
pygame.draw.circle(win,(0,0,0),(randomPos, 480), 10)
This is the lines of code I have added into my code to try make it
The circle object just blinks randomly across my screen spawns and despawns, not sure what to do
Aucun commentaire:
Enregistrer un commentaire