Help on 'types' please.

BlitzMax Forums/BlitzMax Beginners Area/Help on 'types' please.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Woohoo - I think I have it.

Graphics 640,480,0

Type bullet
	Field y
	Field x
End Type

bulletlist:TList = New TList

x=300

While Not KeyHit(key_escape)
	Cls
	
	DrawRect(x,400,20,10)
	If KeyDown(key_right) x:+2
	If KeyDown(key_left) x:-2

	If KeyHit(key_space)
		Local b:bullet
		b=New bullet
		b.y=400
		b.x=x
		bulletlist.addlast(b)
	End If
		
	For Local b2:bullet = EachIn bulletlist
		b2.y:-4
		DrawRect b2.x,b2.y,2,8
	Next

	Flip
Wend


....do I need to kill/delete the bullets when they go off of the screen?