Description | Hierarchy | Fields | Methods | Properties |
type TSprite = class(TObject)
The sprite engines base class.
![]() |
constructor Create(AParent:TSprite); virtual; |
![]() |
destructor Destroy; override; |
![]() |
procedure Move(TimeGap:double); |
![]() |
procedure Draw; virtual; |
![]() |
procedure Dead; virtual; |
![]() |
procedure Restore; |
![]() |
procedure Clear; |
![]() |
function Collision:integer; |
![]() |
procedure Collision2; |
![]() |
function CountOfClass(AClass:TSpriteClass):integer; |
![]() |
procedure Optimize; |
![]() |
function GetSpriteAt(X,Y:integer):TSprite; virtual; |
![]() |
procedure GetSpritesAt(const AX, AY: Integer; ASprites: TSpriteList; AClass : TSpriteClass); overload; virtual; |
![]() |
procedure GetSpritesAt(const AX, AY: Integer; ASprites: TSpriteList); overload; virtual; |
![]() |
property Parent: TSprite read FParent write SetParent; |
![]() |
property Engine: TSpriteEngine read FEngine; |
![]() |
property BoundsRect: TAdRect read GetBoundsRect; |
![]() |
property Items: TSpriteList read FList; |
![]() |
property GridSize: integer read FGridSize write SetGridSize; |
![]() |
property CollisionOptimizationTyp: TCollisionTyp read FCollisionTyp write SetCollisionOptimization; |
![]() |
property SpriteField: TAd2DSpriteList read FSpriteField; |
![]() |
property CollisionTester: TAdSpriteCollisionTester read FCollisionTester write FCollisionTester; |
![]() |
property X: double read FX write SetX; |
![]() |
property Y: double read FY write SetY; |
![]() |
property Z: integer read FZ write SetZ; |
![]() |
property Width: double read FWidth write SetWidth; |
![]() |
property Height: double read FHeight write SetHeight; |
![]() |
property WorldX: double read GetWorldX; |
![]() |
property WorldY: double read GetWorldY; |
![]() |
property Deaded: boolean read FDead; |
![]() |
property VisibilityTest: boolean read FVisibilityTest write FVisibilityTest; |
![]() |
property CanDoCollisions: boolean read FDoCollisions write FDoCollisions; |
![]() |
property CanDoMoving: boolean read FDoMoving write FDoMoving; |
![]() |
property Visible: boolean read FVisible write FVisible; |
![]() |
property AutoOptimize: boolean read FAutoOptimize write FAutoOptimize; |
![]() |
constructor Create(AParent:TSprite); virtual; |
Creates an instance of TSprite. |
![]() |
destructor Destroy; override; |
Destroyes the instance. |
![]() |
procedure Move(TimeGap:double); |
Calls the instance's DoMove function and all child's move function. |
![]() |
procedure Draw; virtual; |
Calls the instance's DoDraw function and all childs' draw function. |
![]() |
procedure Dead; virtual; |
Tells the engine that this instance of TSprite wants to bee freed. |
![]() |
procedure Restore; |
Gives all sprites the posibility to restore their setings - eg. for Lights in Splitscreenmode |
![]() |
procedure Clear; |
Deletes all sprites |
![]() |
function Collision:integer; |
Checks whether this sprite collides with another sprite in the spriteengine. Returns the count of sprites. |
![]() |
procedure Collision2; |
Checks whether this sprite collides to the sprite, that wants to know whether it collides with another sprite. |
![]() |
function CountOfClass(AClass:TSpriteClass):integer; |
Returns the count of a sprite class |
![]() |
procedure Optimize; |
Optimzes the optimization field |
![]() |
function GetSpriteAt(X,Y:integer):TSprite; virtual; |
Returns one sprite at the specified position |
![]() |
procedure GetSpritesAt(const AX, AY: Integer; ASprites: TSpriteList; AClass : TSpriteClass); overload; virtual; |
Returns all sprites at the specified position and of a specified type |
![]() |
procedure GetSpritesAt(const AX, AY: Integer; ASprites: TSpriteList); overload; virtual; |
![]() |
property Parent: TSprite read FParent write SetParent; |
The parent sprite you've set into the constructor. |
![]() |
property Engine: TSpriteEngine read FEngine; |
The sprite engine. |
![]() |
property BoundsRect: TAdRect read GetBoundsRect; |
Returns a rect which contains the relative coordinates (relative to the screen) of the sprite. |
![]() |
property Items: TSpriteList read FList; |
Contains all child sprites. |
![]() |
property GridSize: integer read FGridSize write SetGridSize; |
Sets the size of the sprite field |
![]() |
property CollisionOptimizationTyp: TCollisionTyp read FCollisionTyp write SetCollisionOptimization; |
Sets the type of the collision optimization. |
![]() |
property SpriteField: TAd2DSpriteList read FSpriteField; |
Returns the 2D-Matrix in which all sprites are sorted by their position. This Matrix may be used for fast access on the sprites. |
![]() |
property CollisionTester: TAdSpriteCollisionTester read FCollisionTester write FCollisionTester; |
![]() |
property X: double read FX write SetX; |
The absolute X Position of the sprite. |
![]() |
property Y: double read FY write SetY; |
The absolute Y Position of the sprite. |
![]() |
property Z: integer read FZ write SetZ; |
The Z order of the sprite. |
![]() |
property Width: double read FWidth write SetWidth; |
The width of the sprite. |
![]() |
property Height: double read FHeight write SetHeight; |
The height of the sprite. |
![]() |
property WorldX: double read GetWorldX; |
The relative X Position of the sprite. |
![]() |
property WorldY: double read GetWorldY; |
The relative Y Position of the sprite. |
![]() |
property Deaded: boolean read FDead; |
Returns wether this sprite wants to be freed. |
![]() |
property VisibilityTest: boolean read FVisibilityTest write FVisibilityTest; |
Disable to call the "draw" method of sprites although they aren't visible |
![]() |
property CanDoCollisions: boolean read FDoCollisions write FDoCollisions; |
Defines whether this sprite is included in the collision system. Equal to DelpiX's "Collisioned". |
![]() |
property CanDoMoving: boolean read FDoMoving write FDoMoving; |
Defines whether the "DoMove" function is called. Equal to DelphiX's "Moved". |
![]() |
property Visible: boolean read FVisible write FVisible; |
Defines whether "DoDraw" is called. |
![]() |
property AutoOptimize: boolean read FAutoOptimize write FAutoOptimize; |
True if the optimization field should be automatically optimized |