LogicTarget Class Reference
[Logic minigame]

#include <logictarget.h>

Inherits LogicComponent.

Collaboration diagram for LogicTarget:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LogicTarget ()
 LogicTarget (int numTargets)
 LogicTarget (int numTargets, Point p)
 LogicTarget (int numTargets, int x, int y)
 ~LogicTarget ()
int completionState ()
void setTargets (std::vector< int > targets)
void reset ()
Point inpoint (int slot)
 The absolute position of the in/out tubes that connect to this component.
void addConnector (LogicConnector *connector)
 Connects from some other component to this one.
void removeConnector (int slot)
LogicConnectorgetConnector ()
 Targets have no output.
int nextSlot ()
 The next open input slot.
void acceptRobot (bool value, int slot)
 Takes a robot from a tube and does whatever action is needed.
void draw (BITMAP *canvas, Point offset)
 This is the main reason for this class.
bool containsPoint (Point p)

Protected Member Functions

void init ()
void updateColors ()
 Changes the look of this target.

Protected Attributes

int * received
int * expected
int numTargets
int numReceived
int colors [4]
LogicConnectorinput
WaveSoundgoodSound
WaveSoundbadSound
Graphicglow


Detailed Description


Constructor & Destructor Documentation

LogicTarget::LogicTarget (  ) 

LogicTarget::LogicTarget ( int  numTargets  ) 

LogicTarget::LogicTarget ( int  numTargets,
Point  p 
)

LogicTarget::LogicTarget ( int  numTargets,
int  x,
int  y 
)

LogicTarget::~LogicTarget (  ) 


Member Function Documentation

void LogicTarget::acceptRobot ( bool  value,
int  slot 
) [virtual]

Takes a robot from a tube and does whatever action is needed.

Reimplemented from LogicComponent.

void LogicTarget::addConnector ( LogicConnector connector  )  [virtual]

Connects from some other component to this one.

Implements LogicComponent.

int LogicTarget::completionState (  ) 

bool LogicTarget::containsPoint ( Point  p  )  [virtual]

Reimplemented from LogicComponent.

void LogicTarget::draw ( BITMAP *  canvas,
Point  offset 
) [virtual]

This is the main reason for this class.

Implements Graphic.

LogicConnector* LogicTarget::getConnector (  )  [inline, virtual]

Targets have no output.

Implements LogicComponent.

void LogicTarget::init (  )  [protected]

Point LogicTarget::inpoint ( int  slot  )  [virtual]

The absolute position of the in/out tubes that connect to this component.

Implements LogicComponent.

int LogicTarget::nextSlot (  )  [virtual]

The next open input slot.

Implements LogicComponent.

void LogicTarget::removeConnector ( int  slot  )  [virtual]

Implements LogicComponent.

void LogicTarget::reset (  ) 

void LogicTarget::setTargets ( std::vector< int >  targets  ) 

void LogicTarget::updateColors (  )  [protected]

Changes the look of this target.


Member Data Documentation

int LogicTarget::colors[4] [protected]

int* LogicTarget::expected [protected]

Graphic* LogicTarget::glow [protected]

int LogicTarget::numReceived [protected]

int LogicTarget::numTargets [protected]

int* LogicTarget::received [protected]


The documentation for this class was generated from the following files:

Generated on Mon Mar 16 14:33:11 2009 for LearningGaming by  doxygen 1.5.7.1