Index

Package: Entity_Spawners

Description

package Tools.Entity_Spawners is

Classes

Entity_Spawner

type Entity_Spawner is new Tool with private;

Ancestors:

Primitive operations:

Apply (overriding Tools.Apply)
Construct
Objects.Adjust (Inherited)
Objects.Construct (Inherited)
Objects.Delete (Inherited)
Objects.Object_Read (Inherited)
Objects.Object_Write (Inherited)
Objects.To_String (Inherited)

Types

A_Entity_Spawner

type A_Entity_Spawner is access all Entity_Spawner'Class;

Subprograms & Entries

Create_Entity_Spawner

function Create_Entity_Spawner
( id: String;
snap: Boolean := True ) return A_Tool;
Creates a new entity of class 'id'. If 'snap' is True, the new entity will be snapped to the grid based if the gridsnap preference is enabled and holding ctrl while using the spawner tool will reverse the gridsnap behavior. If 'snap' is False, no grid snapping will ever be performed.

Get_ID

function Get_ID
( this: not null access Entity_Spawner'Class ) return String;

In_Class

function In_Class
( this: not null access Entity_Spawner'Class;
pattern: String ) return Boolean;
Returns True if the class id that this spawner will spawn is within the parent class specified by 'pattern' (case insensitive). For example, to check if the spawner's class id "Entities.Enemies.Cat" is an enemy, use class pattern "Entities.Enemies.*", which will match all registered enemy entity classes. A constant for matching enemy classes is specified in the Entities.Enemies package.