with Allegro.Bitmaps; use Allegro.Bitmaps;
package Entities.Enemies is
type Enemy is abstract new Entity with private;
type A_Enemy is access all Enemy'Class;
function Get_Icon( this : access Enemy ) return A_Bitmap;
function Is_Shootable( this : not null access Enemy'Class ) return Boolean;
procedure Die( this : access Enemy );
private
type Enemy is abstract new Entity with
record
icon : Integer := 0;
deadlyTouch : Boolean := True;
shootable : Boolean := True;
end record;
procedure Construct( this : access Enemy;
width,
height : Natural;
libName : String;
iconName : String );
procedure Object_Read( stream : access Root_Stream_Type'Class; obj : out Enemy );
for Enemy'Read use Object_Read;
procedure Object_Write( stream : access Root_Stream_Type'Class; obj : Enemy );
for Enemy'Write use Object_Write;
procedure On_Collide( this : access Enemy; e : not null A_Entity );
procedure Delete( this : in out A_Enemy );
pragma Postcondition( this = null );
end Entities.Enemies;