Keeping Track of Instances

BlitzMax Forums/BlitzMax Beginners Area/Keeping Track of Instances

Better yet:

Type Bullet
	Global List:TList
	Field X#,Y#
	Field XV#,YV#

	Method Move()
		X+:XV
		Y+:XY
	EndMethod

	Method Draw()
		DrawOval(x,y,10,10)
	EndMethod

	Method New()	'Automatically called
		List.AddLast(Self)
	EndMethod
EndType

Bullet.List=New TList
'etc etc


duckstab: http://www.blitzbasic.com/Community/posts.php?topic=42822