| Class TBullet (unit Gameform) |
TObject
| Constructors |
constructor Create;| Functions |
destructor Destroy;
procedure Draw;
procedure Erase;
procedure EraseThenDraw;
function Move : integer;
procedure Setup(x,y:integer; dir:integer; dam:integer);
procedure SetupLimits(xmx,xmn,ymx,ymn:integer; goodguy:boolean);| Properties |
| Events |
| Variables |
bp : TPoint;
damage : integer;
direction : integer;
good : boolean;
horizontal : boolean;
lp : TPoint;
maxx : integer;
maxy : integer;
minx : integer;
miny : integer;| Constructors |
constructor Create;---------------------------------------------------------------------------- } { Simple Bullet } { ----------------------------------------------------------------------------
| Functions |
destructor Destroy;I know I've forgotten to free some objects - debug
procedure Draw;SetPixel(Game_DC,bp.x ,bp.y+1,$00FFFFFF);} { SetPixel(Game_DC,bp.x ,bp.y-1,$00FFFFFF);
procedure Erase;SetPixel(Game_DC,bp.x ,bp.y+1,$00FFFFFF);} { SetPixel(Game_DC,bp.x ,bp.y-1,$00FFFFFF);
procedure EraseThenDraw;setpixel is slooow. I need directdraw to really soup up the bullets
function Move : integer;I could do two descendent objects for horiz and vert objects and use a virtual approach, but a case statment is faster for just a couple of derived types } { I think
procedure Setup(x,y:integer; dir:integer; dam:integer);
procedure SetupLimits(xmx,xmn,ymx,ymn:integer; goodguy:boolean);stop the bullet going too far off the edge
| Properties |
| Events |
| Variables |
bp : TPoint;
damage : integer;
direction : integer;
good : boolean;
horizontal : boolean;
lp : TPoint;
maxx : integer;
maxy : integer;
minx : integer;
miny : integer;