Class TAsteroid (unit Asteroid)

Inherits from

TVisibleObject

****** * * Module: Asteroid * Author: Joe Kessler * IntegrationWare - A New Generation of Extraordinary PC Solutions * www.integrationware.com * * Purpose: * * This module defines the look and behavior of an asteroid in Rocks. * Asteroid are nothing but floating chunks of rock, but they have a * special look and behavior as defined here. * ******

Constructors


constructor Create(listObjects: TList; fMass: Real; scrScoreBoard: TScoreBoard; iCollisionID: Integer);

*** Our constructor ***

Reference to the scoreboard object.



Functions

procedure DefineAsteroidShape;

Establish the mass of the asteroid up front, since the shape relies upon this.

procedure HandleCollision(objOtherObject: TVisibleObject);

Wrap around if we've gone off the screen.

procedure Move;

Set up default coloring and visiblity information.

procedure SplitIntoChunk(fScale: Real; fDirection, fSpeed: Real);

Make an exploding sound.

Properties

Events

Variables

m_scrScoreBoard : TScoreBoard;



Constructors


constructor Create(listObjects: TList; fMass: Real; scrScoreBoard: TScoreBoard; iCollisionID: Integer);

*** Our constructor ***

Reference to the scoreboard object.


Functions


procedure DefineAsteroidShape;

Establish the mass of the asteroid up front, since the shape relies upon this. Then, generate a reasonable asteroid shape algorithmically.


procedure HandleCollision(objOtherObject: TVisibleObject);

Wrap around if we've gone off the screen.


procedure Move;

Set up default coloring and visiblity information.


procedure SplitIntoChunk(fScale: Real; fDirection, fSpeed: Real);

Make an exploding sound.


Properties


Events


Variables


m_scrScoreBoard : TScoreBoard;