1. package Entities.Players.Little_Keen is 
  2.  
  3.     pragma Elaborate_Body; 
  4.  
  5.     type Little_Keen is new Player with private; 
  6.     type A_Little_Keen is access all Little_Keen'Class; 
  7.  
  8.     -- Accelerates Keen in the direction 'dir'. 
  9.     procedure Move_Start( this : access Little_Keen; dir : Cardinal_Direction ); 
  10.  
  11.     -- Stops Keen's acceleration in the direction 'dir'. 
  12.     procedure Move_Stop( this : access Little_Keen; dir : Cardinal_Direction ); 
  13.  
  14. private 
  15.  
  16.     type Action_Type is (Act_Walking, Act_Swimming, Act_Idle); 
  17.  
  18.     type Little_Keen is new Player with 
  19.         record 
  20.             action         : Action_Type := Act_Walking; 
  21.             actionStart    : Time_Span := Time_Span_Zero; 
  22.             actionDuration : Time_Span := Time_Span_Zero; 
  23.             idleStart      : Time_Span := Time_Span_Zero; 
  24.  
  25.             -- ** these fields do not need to be streamed ** 
  26.  
  27.             upTime : Time_Span := Time_Span_Zero; 
  28.  
  29.             walkSpeed, 
  30.             walkAcceleration : Float := 0.0; 
  31.         end record; 
  32.  
  33.     procedure Construct( this : access Little_Keen ); 
  34.  
  35.     procedure Die( this : access Little_Keen ); 
  36.  
  37.     procedure Face( this : access Little_Keen; dir : Direction_Type ); 
  38.  
  39.     function Is_Busy( this : not null access Little_Keen'Class ) return Boolean; 
  40.  
  41.     function Object_Input( stream : access Root_Stream_Type'Class ) return Little_Keen; 
  42.     for Little_Keen'Input use Object_Input; 
  43.  
  44.     procedure Object_Read( stream : access Root_Stream_Type'Class; obj : out Little_Keen ); 
  45.     for Little_Keen'Read use Object_Read; 
  46.  
  47.     procedure Object_Write( stream : access Root_Stream_Type'Class; obj : Little_Keen ); 
  48.     for Little_Keen'Write use Object_Write; 
  49.  
  50.     procedure Reset_Idle( this : not null access Little_Keen'Class ); 
  51.  
  52.     procedure Start_Action( this   : not null access Little_Keen'Class; 
  53.                             action : Action_Type; 
  54.                             length : Time_Span := Time_Span_Zero ); 
  55.  
  56.     procedure Tick( this : access Little_Keen; time : Tick_Time ); 
  57.  
  58.     procedure Update_Frame( this : access Little_Keen; notify : Boolean := True ); 
  59.  
  60. end Entities.Players.Little_Keen;