From 497670ace3bfaf6b28931ac12c4a0a8ee553bf55 Mon Sep 17 00:00:00 2001 From: Ian C Date: Tue, 27 Sep 2005 00:48:54 +0000 Subject: Designer pretty much complete. Some bug fixes to the game engine. --- types.bmx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'types.bmx') diff --git a/types.bmx b/types.bmx index 2f83707..a0974e3 100644 --- a/types.bmx +++ b/types.bmx @@ -67,9 +67,12 @@ Type TMass EndIf End Method - Method MoveAndDraw() + Method Move() x:+v.x y:+v.y + End Method + + Method Draw() SetColor(255,255,255) DrawImage(img,x,y,swallow) swallow=0 @@ -131,30 +134,34 @@ Type TPoint v.Add(d) - If d.Length()>MASSSIZE - d.SetLength(MASSSIZE) + If d.Length()>MASSRAD + d.SetLength(MASSRAD) EndIf EndIf Return dead End Method - Method MoveAndDraw() + Method Move() If (Not dead) And (Not lost) lx=x ly=y x:+v.x y:+v.y - SetColor(r,g,b) - DrawImage(img,x,y,0) - If x<0 Or y<0 Or x>GraphicsWidth() Or y>GraphicsHeight() lost=True TParticleMachine.AddLost(Self) EndIf EndIf End Method + + Method Draw() + If (Not dead) And (Not lost) + SetColor(r,g,b) + DrawImage(img,x,y,0) + EndIf + End Method End Type -- cgit v1.2.3