For my gorrilla remake I have a list that holds all of the crater objects. When a new game is made, I don't want the craters there anymore, but want to start a fresh list. All I see in the docs is that there is a Clear() method, but how do I use it to clear the list? My type:
Type Crater
Field x:Int,y:Int,size:Int
Global CraterList:TList=New(TList)
Method Draw()
CollideRect(x+12,y+12,size-12,size-12,0,2)
SetColor(55,155,255)
DrawOval(x,y,size,size)
End Method
Method New()
CraterList.AddLast(Self)
End Method
Method Clear()
End Method
Function Create:Crater(x:Int,y:Int,size:Int)
Local c:Crater=New Crater
c.x=x-size
c.y=y-size
c.size=size*2
Return c
End Function
End Type
|