Index

Package: Actors

Description

package Actors is

Classes

Actor (abstract)

type Actor is abstract new Limited_Object with private;

Ancestors:

Immediate Children:

Actors.Keen4.Arachnut_Actor
Actors.Keen4.Bounder_Actor
Actors.Keen4.Cloud_Actor
Actors.Keen4.Inchworm_Actor
Actors.Keen4.Lick_Actor
Actors.Keen4.Mimrock_Actor
Actors.Keen4.Mushroom_Actor
Actors.Keen4.Slug_Actor
Actors.Keen4.Snake_Actor

Primitive operations:

Objects.Construct (Inherited)
Objects.Delete (Inherited)
Objects.To_String (Inherited)

Types

A_Actor

type A_Actor is access all Actor'Class;

Subprograms & Entries

Create_Actor

function Create_Actor
( entityClass: String ) return A_Actor;
Creates a new actor to control an entity, given the entity's class name. The allocator used for creation is registered at elaboration time.

Impulse (abstract)

procedure Impulse
( this: access Actor;
name: Hashed_String ) is abstract;
Handles Impulses given by a user.

Pause

procedure Pause
( this: access Actor ) is null;
Override this to stop any on-going actions begun with a previous impulse when the game is paused.

Is_Temporal

function Is_Temporal
( this: access Actor ) return Boolean;
Returns True if the actor's life span is confined to the life span of the world in which its entity exists. The default for actors is True unless overridden.

Set_Entity

function Set_Entity
( this: access Actor;
e: A_Entity ) return Boolean;
Sets the entity that the actor controls, returning True on acceptance. For non-temporal actors, this can be 'null' between worlds or before loading a world. The concrete subclasses should override this function to verify the entity's class before calling the base Set_Entity procedure.

Set_Entity

procedure Set_Entity
( this: access Actor;
e: A_Entity );
Sets the entity that the actor controls. The actor must be able to control entities of the given class.

Set_Game

procedure Set_Game
( this: not null access Actor'Class;
game: not null access Games.Game'Class );
Sets the Actor's reference to its parent Game object.

Delete

procedure Delete
( this: in out A_Actor );
Deletes an actor object.

Initialize

procedure Initialize;

Finalize

procedure Finalize;