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