Index

Package: Games

Description

package Games is

Classes

Game (abstract)

type Game is abstract new Limited_Object and Event_Listener and Process with private;

Ancestors:

Immediate Children:

Games.Ked.Ked_Game

Primitive operations:

Add_Event_Listeners
Construct (overriding Objects.Construct)
Delete (overriding Objects.Delete)
End_Game
Events.Listeners.To_String (Inherited)
Get_Process_Name
Handle_Event (overriding Events.Listeners.Handle_Event)
New_Game
Objects.To_String (Inherited)
Pause
Processes.Get_Process_Name (Inherited)
Processes.Tick (Inherited)
Remove_Event_Listeners
Tick

Types

A_Game

type A_Game is access all Game'Class;

Subprograms & Entries

Create_Game

function Create_Game return A_Game;
Creates a new Game object, using the registered allocator.

Add_View

procedure Add_View
( this: not null access Game'Class;
view: in out A_Game_View );
Adds a view to the game logic. 'view' is consumed and then owned by the Game object.

Game_Var_Add

procedure Game_Var_Add
( this: not null access Game'Class;
var: String;
val: Integer );
Adds 'val' to game session variable 'var'. A Game_Var_Changed event is queued. An exception is raised on error.

Get_Corral

function Get_Corral
( this: not null access Game'Class ) return A_Corral;
Returns the Game's event corral. It is created during Game construction.

Get_Game_Var

function Get_Game_Var
( this: not null access Game'Class;
var: String ) return Integer;
Returns the value of game session var 'var' as an integer. An exception will be raised on error.

Load_World

procedure Load_World
( this: not null access Game'Class;
name: String );
Unloads the current world and attaches the new world to the game framework. If an error occurs, an exception will be raised and the current world not change.

Start

procedure Start
( this: access Game );
Starts the game logic and attaches it to the framework.

Stop

procedure Stop
( this: not null access Game'Class );
Stops the game logic and detaches it from the framework.

Delete

procedure Delete
( this: in out A_Game );
Deletes the Game.