Index

Package: Items

Description

package Entities.Items is
Copyright (c) 2012 Kevin Wellwood All rights reserved. This source code is distributed under the Modified BSD License. For terms and conditions, see license.txt.

Classes

Item (abstract)

type Item is abstract new Entity with private;

Ancestors:

Immediate Children:

Entities.Items.Keen4.Blue_Gem
Entities.Items.Keen4.Candybar
Entities.Items.Keen4.Donut
Entities.Items.Keen4.Drop
Entities.Items.Keen4.Flask
Entities.Items.Keen4.Green_Gem
Entities.Items.Keen4.Gum
Entities.Items.Keen4.Icecream
Entities.Items.Keen4.Jawbreaker
Entities.Items.Keen4.Red_Gem
Entities.Items.Keen4.Soda
Entities.Items.Keen4.Stunner
Entities.Items.Keen4.Yellow_Gem

Primitive operations:

Construct
Entities.Adjust (Inherited)
Entities.Construct (Inherited)
Entities.Delete (Inherited)
Entities.Object_Input (Inherited)
Entities.On_Activate (Inherited)
Entities.On_Hit_Wall (Inherited)
Entities.On_Load (Inherited)
Entities.On_Separate (Inherited)
Entities.Set_Attribute (Inherited)
Entities.Set_Directive (Inherited)
Entities.Tick (Inherited)
Entities.To_String (Inherited)
Entities.Update_Frame (Inherited)
Object_Read (overriding Entities.Object_Read)
Object_Write (overriding Entities.Object_Write)
Objects.Construct (Inherited)
On_Collide (overriding Entities.On_Collide)
Update (overriding Entities.Update)
An Item is an animated Entity, unaffected by gravity, that gives the player a bonus when he touches it. It automatically destroys itself on collision so the bonus is only given once.

Types

A_Item

type A_Item is access all Item'Class;

Constants & Global variables

CLASS_PATTERN (String)

CLASS_PATTERN : constant String := "Entities.Items.*";
A class pattern that matches all item class ids registered in the entity factory.

Subprograms & Entries

Get_Icon

function Get_Icon
( this: access Item ) return A_Allegro_Bitmap;
Returns a reference to a bitmap icon that represents the item. This can used for displaying a visual representation of the item, in a palette, for instance. The reference returned is owned by the item. Do not modify it.

Give_Item (abstract)

procedure Give_Item
( this: access Item ) is abstract;
Gives the item's bonus to the player. Each item class gives a different bonus. This is called when the Player entity collides with the Item.