Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members

Gobject Class Reference

A Gobject, or Game Object, is instantiated to represent every object (for example, paddle or spaceship) that exists in the game. More...

List of all members.

Public Member Functions

 Gobject ()
 Gobject (Gobject g)
 Copy Constructor.
ArrayList execute (Map collisions, Map k)
 Runs every behavior stored in this Gobject.
void paint (Canvas jp, Graphics g)
 This function takes the Gobject's image and location information and uses it to draw the Gobject to the screen.
ArrayList getBehaviors ()
Object getVariable (String s)
Map getData ()
void setBehavior (Behavior b)
void setData (String s, Object o)

Private Attributes

ArrayList behaviorList
Map data


Detailed Description

A Gobject, or Game Object, is instantiated to represent every object (for example, paddle or spaceship) that exists in the game.

Gobject is not subclassed, and Gobjects differ only by their data and behaviors. All data is stored in the Gobject using a Map.


Constructor & Destructor Documentation

Gobject::Gobject  )  [inline]
 

Gobject::Gobject Gobject  g  )  [inline]
 

Copy Constructor.

Parameters:
g -- another Gobject


Member Function Documentation

ArrayList Gobject::execute Map  collisions,
Map  k
[inline]
 

Runs every behavior stored in this Gobject.

Returns:
an arrayList of all flags generated by this Gobject's behaviors

ArrayList Gobject::getBehaviors  )  [inline]
 

Map Gobject::getData  )  [inline]
 

Object Gobject::getVariable String  s  )  [inline]
 

void Gobject::paint Canvas  jp,
Graphics  g
[inline]
 

This function takes the Gobject's image and location information and uses it to draw the Gobject to the screen.

The painting occurs on a canvas which is not the current canvas, enabling double buffering.

Parameters:
jp 
g -- graphics associated with the given canvas

void Gobject::setBehavior Behavior  b  )  [inline]
 

void Gobject::setData String  s,
Object  o
[inline]
 


Member Data Documentation

ArrayList Gobject::behaviorList [private]
 

Map Gobject::data [private]
 


The documentation for this class was generated from the following file:
Generated on Fri May 6 02:44:38 2005 for Duvall does XOOGA by  doxygen 1.4.1