private with Ada.Strings.Unbounded;
package Tools.Entity_Spawners is
type Entity_Spawner is new Tool with private;
type A_Entity_Spawner is access all Entity_Spawner'Class;
function Create_Entity_Spawner( id : String; snap : Boolean := True ) return A_Tool;
pragma Precondition( id'Length > 0 );
pragma Postcondition( Create_Entity_Spawner'Result /= null );
function Get_ID( this : not null access Entity_Spawner'Class ) return String;
pragma Postcondition( Get_ID'Result'Length > 0 );
function In_Class( this : not null access Entity_Spawner'Class;
pattern : String ) return Boolean;
private
use Ada.Strings.Unbounded;
type Entity_Spawner is new Tool with
record
id : Unbounded_String;
snap : Boolean := False;
end record;
procedure Apply( this : access Entity_Spawner;
func : Function_Type;
modifiers : Modifiers_Array;
first : Boolean;
world : not null A_World;
worldX,
worldY,
layer : Integer );
procedure Construct( this : access Entity_Spawner;
id : String;
snap : Boolean );
pragma Precondition( id'Length > 0 );
end Tools.Entity_Spawners;