Using object extensions and default functions

BlitzMax Forums/BlitzMax Beginners Area/Using object extensions and default functions

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.

Type small_enemy3 Extends enemy
Function Create(x#,y#,speed#,direction#)
	Local temp:small_enemy3 = New small_enemy3
	temp.x=x
	temp.y=y
	temp.sprite=enemy_3
	temp.speed = speed
	temp.direction = direction
	enemy_shot.Create(x,y,5,90)
	ListAddLast(enemy_list,temp)
End Function
Method Update()
	direction:+7
End Method
EndType


try this