with Allegro.Bitmaps; use Allegro.Bitmaps;
package Entities.Items is
type Item is abstract new Entity with private;
type A_Item is access all Item'Class;
function Get_Icon( this : access Item ) return A_Bitmap;
procedure Give_Item( this : access Item ) is abstract;
private
type Item is abstract new Entity with
record
frameDelay : Time_Span := Time_Span_Zero;
firstFrame : Natural := 0;
maxFrames : Positive := 1;
end record;
procedure Construct( this : access Item;
width,
height : Natural;
libName : String;
firstFrame : String;
maxFrames : Positive;
frameDelay : Time_Span );
procedure On_Collide( this : access Item; e : not null A_Entity );
procedure Tick( this : access Item; upTime, dt : Time_Span );
procedure Object_Read( stream : access Root_Stream_Type'Class; obj : out Item );
for Item'Read use Object_Read;
procedure Object_Write( stream : access Root_Stream_Type'Class; obj : Item );
for Item'Write use Object_Write;
procedure Delete( this : in out A_Item );
pragma Postcondition( this = null );
end Entities.Items;