RemoveLink

BlitzMax Forums/BlitzMax Beginners Area/RemoveLink

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.

I finally figured out that you can override.

Remove
and
AddLast


I just store the Link as a Field in the Type.

Works great.

Type TObject
	Field Image:Timage
	Field Position:Tvector
	Field Velocity:TVector
	Field Acceleration:TVector
	Field GravityAffect:Tvector
	Field Speed:Float
	Field Angle:Float 
	Field Link:TLink
	Field Rotation:Float
	
	Method remove()
		Link.Remove
	End Method

	Method AddLast( list:TList )
		Link=List.AddLast( Self )
	End Method
	Method Update() Abstract 
	Method Draw() Abstract 
End Type 

If Position.InRange(Target,25)
   RemoveLink Self.Link
End If