Units
Class Hierarchy
Classes, Interfaces and Objects
Types
Variables
Constants
Functions and Procedures
Identifiers

Class TMuggleObject

Unit

MuggleObject

Declaration

type TMuggleObject = class(TMuggleBaseObject)

Description

: ============================================================================
TMuggleObject

Every game object is a MuggleObject. The MuggleManager stores and manages all of these objects: creation, deletion, etc.
The Create and Destroy methods should never be used for Game-related stuff.
This is because the engine will create "dummy" copies of the objects.
There are OnBirth and OnDelete methods for Game-related code.
The BuildVisuals and ReleaseVisuals are for introducing GLScene visuals.
The UpdateVisuals method is for updating your GLScene visuals.
The Initialize method is for one-time class-wide code such as building the FreeForm for a proxy object.
The OnCollide and OnDamage methods are game event functions.

Hierarchy

TMuggleBaseObject

Methods

Overview

Public procedure BuildVisuals; virtual;
Public procedure Cease;
Public Constructor Create; override;
Public Destructor Destroy; override;
Public procedure FullDisplay(aList: TStrings); override;
Protected function GetPrimaryVisual: TGLBaseSceneObject; virtual;
Public procedure Initialize; virtual;
Public class function IsStatic: boolean; virtual;
Public procedure OnBirth; virtual;
Public procedure OnCollide(aCollider: TMuggleObject); virtual;
Public procedure OnDelete; virtual;
Public function OneLineDisplay: string; override;
Public procedure ReleaseVisuals; virtual;
Public procedure Step; virtual;
Public procedure UpdateVisuals; virtual;

Description

Public procedure BuildVisuals; virtual;

build visuals

Public procedure Cease;

Stop existing, and queue on Trash list

Public Constructor Create; override;

 

Public Destructor Destroy; override;

 

Public procedure FullDisplay(aList: TStrings); override;

many lines of text to describe this object's state

Protected function GetPrimaryVisual: TGLBaseSceneObject; virtual;

This function returns Visuals.Items[0] by default, can be overridden

Public procedure Initialize; virtual;

call initialize only once per class (when first object of class is created)

Public class function IsStatic: boolean; virtual;

is this object static? (static = doesnt move in the game world)

Public procedure OnBirth; virtual;

called once when born

Public procedure OnCollide(aCollider: TMuggleObject); virtual;

called when colliding with another object

Public procedure OnDelete; virtual;

called once when deleted

Public function OneLineDisplay: string; override;

one line of text to describe this object's state

Public procedure ReleaseVisuals; virtual;

free visuals

Public procedure Step; virtual;

Run management/ai code

Public procedure UpdateVisuals; virtual;

update visuals

Properties

Overview

Public property Age: integer;
Public property Birthday: integer;
Public property Definition: TMuggleDefinition;
Public property Exists: boolean;
Public property PrimaryVisual: TGLBaseSceneObject;
Public property Visuals: TMuggleBaseContainer;
Public property VisualsShared: TMuggleReferenceList;

Description

Public property Age: integer;

Age in clock ticks

Public property Birthday: integer;

Time of birth

Public property Definition: TMuggleDefinition;

The shared Definition among this object class

Public property Exists: boolean;

Exists in the game? If not, its gonna be deleted.

Public property PrimaryVisual: TGLBaseSceneObject;

primary visual (returns Visuals.Items[0] by default)

Public property Visuals: TMuggleBaseContainer;

a list of all owned visuals (owned)

Public property VisualsShared: TMuggleReferenceList;

a list of all shared visuals (not owned)


Generated by PasDoc 0.8.7 on Mon 29/ Sep 2003 18:51:05