| Class TSprite (unit Sprites) |
| Constructors |
constructor Create(AOwner: TComponent);TSprite
| Functions |
procedure MoveSprite;
procedure Loaded;
procedure Paint;Paint - the component as a dashed clear box the size of any loaded image, with the image rendered, at design time.
procedure SetOnBounce(Value: TNotifyEvent);
procedure SetOnMove(Value: TSpriteMoveEvent);
procedure SetVX(Value: integer);
procedure SetVY(Value: integer);| Properties |
property AndImage :
property Enabled :
property OrImage :
property VX : integer
property VY : integer
property SLeft : integer
property STop : integer| Events |
event OnBounce : TNotifyEvent
event OnMove : TSpriteMoveEvent| Variables |
FOnBounce : TNotifyEvent;
FOnMove : TSpriteMoveEvent;
FSLeft : integer;
FSTop : integer;
FVX : integer;
FVY : integer;| Constructors |
constructor Create(AOwner: TComponent);public declarations
TSprite
| Functions |
procedure MoveSprite;MoveSprite - set bounds to the size and LOCATION of the image. Trigger an OnMove event. Set the location of the sprite to any changed value of bounds.
procedure Loaded;set sprite position equal to component position AFTER component is loaded
procedure Paint;protected declarations
Paint - the component as a dashed clear box the size of any loaded image, with the image rendered, at design time. Do nothing at run time.
procedure SetOnBounce(Value: TNotifyEvent);
procedure SetOnMove(Value: TSpriteMoveEvent);
procedure SetVX(Value: integer);SetVX - if the value is -1, 0 or 1 then set the direction vector. This indicates a bounce condition in most cases so create an OnBounce event
procedure SetVY(Value: integer);SetVY - if the value is -1, 0 or 1 then set the direction vector. This indicates a bounce condition in most cases so create an OnBounce event
| Properties |
property AndImage :
property Enabled :
property OrImage :
property VX : integerpublished declarations
property VY : integer
property SLeft : integer
property STop : integer| Events |
event OnBounce : TNotifyEvent
event OnMove : TSpriteMoveEvent| Variables |
FOnBounce : TNotifyEvent;
FOnMove : TSpriteMoveEvent;
FSLeft : integer;private declarations
FSTop : integer;
FVX : integer;
FVY : integer;