How to delete all the objects in a list?
So it is basicly like the title. I' ve ran into this problem while making my new game. So I came here for some help.
P.S: I am using the Quick Engine
So it is basicly like the title. I' ve ran into this problem while making my new game. So I came here for some help.
P.S: I am using the Quick Engine
I'm not sure I've understand your needs, but maybe something like reinitialize the list itself?
Quick.objects = []
The fastest way to empty a list is to replace it with an empty list, as @HomineLudens suggests.
If you really need to keep the same list object with everything removed from it, you may use:
while list.length>0
list.removeAt(0)
end