YaY! I'm new!

Blitz3D Forums/Blitz3D Beginners Area/YaY! I'm new!


how does one organize functions when they do not belong to objects?



The following is an example of pseudo classes in Blitz, using a standard naming convention and a 'this' pointer as the first argument of your 'methods':

Type ball
	Field	x#,y#
	Field	vx#,vy#
End Type

Global BallImage

Function UpdateBall(b.ball)
	b\x=b\x+b\vx
	b\y=b\y+b\vy
End Function

Function DrawBall(b.ball)
	DrawImage BallImage,b\x,b\y
End Function