1. -- 
  2. -- Copyright (c) 2012 Kevin Wellwood 
  3. -- All rights reserved. 
  4. -- 
  5. -- This source code is distributed under the Modified BSD License. For terms and 
  6. -- conditions, see license.txt. 
  7. -- 
  8.  
  9. package Actors.Keen is 
  10.  
  11.     function Create_Keen return A_Actor; 
  12.  
  13.     ---------------------------------------------------------------------------- 
  14.  
  15.     type Behavior is abstract new Limited_Object with private; 
  16.     type A_Behavior is access all Behavior'Class; 
  17.  
  18.     procedure Impulse( this : access Behavior; name : Hashed_String ) is abstract; 
  19.  
  20.     procedure Pause( this : access Behavior ) is abstract; 
  21.  
  22. private 
  23.  
  24.     type Keen_Actor is new Actor with 
  25.         record 
  26.             behavior : A_Behavior := null; 
  27.             ammo     : Integer := 0; 
  28.             drops    : Integer := 0; 
  29.             points   : Integer := 0; 
  30.             nextLife : Integer := 0; 
  31.             lives    : Integer := 0; 
  32.             ancients : Integer := 0; 
  33.             scuba    : Boolean := False; 
  34.         end record; 
  35.     type A_Keen_Actor is access all Keen_Actor'Class; 
  36.  
  37.     procedure Construct( this : access Keen_Actor ); 
  38.  
  39.     procedure Impulse( this : access Keen_Actor; name : Hashed_String ); 
  40.  
  41.     function Is_Temporal( this : access Keen_Actor ) return Boolean; 
  42.  
  43.     -- Stops player acceleration when the game is paused. 
  44.     procedure Pause( this : access Keen_Actor ); 
  45.  
  46.     -- Accepts Entities.Players.Keen.Keen entities. 
  47.     function Set_Entity( this : access Keen_Actor; e : A_Entity ) return Boolean; 
  48.  
  49.     ---------------------------------------------------------------------------- 
  50.  
  51.     type Behavior is abstract new Limited_Object with 
  52.         record 
  53.             actor : A_Keen_Actor; 
  54.         end record; 
  55.  
  56.     type Map_Behavior is new Behavior with null record; 
  57.  
  58.     procedure Impulse( this : access Map_Behavior; name : Hashed_String ); 
  59.  
  60.     procedure Pause( this : access Map_Behavior ); 
  61.  
  62.     type Platform_Behavior is new Behavior with null record; 
  63.  
  64.     procedure Impulse( this : access Platform_Behavior; name : Hashed_String ); 
  65.  
  66.     procedure Pause( this : access Platform_Behavior ); 
  67.  
  68. end Actors.Keen;