Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Actor Class Reference
[Managed Objects]

Actor Class Definition. More...

#include <Actor.h>

Inheritance diagram for Actor:

Inheritance graph
[legend]
Collaboration diagram for Actor:

Collaboration graph
[legend]
List of all members.

Public Methods

 Actor ()
WDError initRef (void *inNode, IObjectManager *inManager, IObjectEventHandler *inEventHandler)
WDError initRef (ActorGroup *inParent, int inIndex, IObjectEventHandler *inEventHandler)
WDError initNew (ActorGroup *inParent, Image *inBaseImage, IObjectEventHandler *inEventHandler)
WDError setBaseImage (void *inBaseImage, IObjectManager *inObjectManager)
WDError getBaseImage (void **outBaseImage)
WDError getEnergy (float *outEnergy)
WDError setEnergy (float inEnergy)
void childChanged (IManagedObject *inTarget, void *inChild)

Protected Methods

WDError updateBaseImageID ()

Private Attributes

ImagemBaseImage

Detailed Description

Actor Class Definition.

An actor is an object that can be seen on the screen (e.g. a ship or a bullet). Actors are grouped below the ActorGroup.


Constructor & Destructor Documentation

Actor::Actor  
 


Member Function Documentation

void Actor::childChanged IManagedObject   inTarget,
void *    inChild
[virtual]
 

Called when a child of the data node has been modified

Parameters:
inTarget  IManagedObject which was subscribed to the data node
inChild  Data node of the child which has changed

Reimplemented from ManagedObject.

WDError Actor::getBaseImage void **    outBaseImage
 

Returns the default image of the Actor

Parameters:
outBaseImage  Data node of the default image for the actor

WDError Actor::getEnergy float *    outEnergy
 

Returns the initial amount of energy for the Actor

Parameters:
outEnergy  initial amount of energy

WDError Actor::initNew ActorGroup   inParent,
Image   inBaseImage,
IObjectEventHandler   inEventHandler
 

Creates a new Actor and adds it to the database

Parameters:
inParent  ActorGroup in which the Actor is to be added
inBaseImage  Default image for the actor
inEventHandler  EventHandler which listens to changes on the data node (can be NULL)

WDError Actor::initRef ActorGroup   inParent,
int    inIndex,
IObjectEventHandler   inEventHandler
 

Initializes an existing Actor based on its parent

Parameters:
inParent  ActorGroup in which the Actor is
inIndex  Index of the Actor in the ActorGroup
inEventHandler  EventHandler which listens to changes on the data node (can be NULL)

WDError Actor::initRef void *    inNode,
IObjectManager   inManager,
IObjectEventHandler   inEventHandler
 

Initializes an existing Actor based on data node

Parameters:
inNode  Data node representing the Actor
inManager  Database from which the data node was taken
inEventHandler  EventHandler which listens to changes on the data node (can be NULL)

Reimplemented from ManagedObject.

WDError Actor::setBaseImage void *    inBaseImage,
IObjectManager   inObjectManager
 

Changes the default image of the Actor

Parameters:
inBaseImage  Data node of the new default image for the actor
inObjectManager  Database from which the image data node was taken

WDError Actor::setEnergy float    inEnergy
 

Sets the initial amount of energy for the Actor

Parameters:
inEnergy  initial amount of energy

WDError Actor::updateBaseImageID   [protected]
 

Updates the image attribute in the database - used when the ID of the referenced image has changed.


Member Data Documentation

Image* Actor::mBaseImage [private]
 

Default image when the state is unspecified


The documentation for this class was generated from the following file:
Generated on Mon Apr 15 15:23:09 2002 for WhiteDwarf by doxygen1.2.15