How to clear all sprites on the screen or chosen sprites.
Is there a way to completely delete sprites with any function or smth ?
@tanjavaner Have you tried using sprite.remove()?
I tried remove() but I want to delete it completely .
For example lets say I have 7 sprites on the screen.
sp1 , sp2 , sp3 , sp4 , sp5 , sp6 , sp7
When I want to make a simple platformer game the first 7 sprites should be removed from technically and graphically so I can add other stage's sprites . I can only hide it can not be completely removed from the screen and memory.
Calling remove() on a sprite will unregister and remove it from the screen. But if for some reason you need to remove it from memory as well, you can unset the variable that holds the sprite object so the garbage collector can do its thing.
Thank you so much