1. with Allegro.Bitmaps;                   use Allegro.Bitmaps; 
  2.  
  3. package Entities.Enemies is 
  4.  
  5.     type Enemy is abstract new Entity with private; 
  6.     type A_Enemy is access all Enemy'Class; 
  7.  
  8.     -- Returns a reference to a bitmap icon that represents the enemy. The 
  9.     -- returned reference is owned by the enemy. Do not modify it! 
  10.     function Get_Icon( this : access Enemy ) return A_Bitmap; 
  11.  
  12. private 
  13.  
  14.     type Enemy is abstract new Entity with 
  15.         record 
  16.             icon        : Integer := 0; 
  17.             deadlyTouch : Boolean := True; 
  18.         end record; 
  19.  
  20.     -- Raises an exception on error. 
  21.     procedure Construct( this     : access Enemy; 
  22.                          width, 
  23.                          height   : Natural; 
  24.                          libName  : String; 
  25.                          iconName : String ); 
  26.  
  27.     procedure Object_Read( stream : access Root_Stream_Type'Class; obj : out Enemy ); 
  28.     for Enemy'Read use Object_Read; 
  29.  
  30.     procedure Object_Write( stream : access Root_Stream_Type'Class; obj : Enemy ); 
  31.     for Enemy'Write use Object_Write; 
  32.  
  33.     procedure On_Collide( this : access Enemy; e : not null A_Entity ); 
  34.  
  35.     procedure Delete( this : in out A_Enemy ); 
  36.     pragma Postcondition( this = null ); 
  37.  
  38. end Entities.Enemies;