#include <logictarget.h>
Inherits LogicComponent.

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) |
| LogicConnector * | getConnector () |
| 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] |
| LogicConnector * | input |
| WaveSound * | goodSound |
| WaveSound * | badSound |
| Graphic * | glow |
| LogicTarget::LogicTarget | ( | ) |
| LogicTarget::LogicTarget | ( | int | numTargets | ) |
| LogicTarget::LogicTarget | ( | int | numTargets, | |
| Point | p | |||
| ) |
| LogicTarget::LogicTarget | ( | int | numTargets, | |
| int | x, | |||
| int | y | |||
| ) |
| LogicTarget::~LogicTarget | ( | ) |
| void LogicTarget::acceptRobot | ( | bool | value, | |
| int | slot | |||
| ) | [virtual] |
| void LogicTarget::addConnector | ( | LogicConnector * | connector | ) | [virtual] |
| int LogicTarget::completionState | ( | ) |
| bool LogicTarget::containsPoint | ( | Point | p | ) | [virtual] |
Reimplemented from LogicComponent.
| void LogicTarget::draw | ( | BITMAP * | canvas, | |
| Point | offset | |||
| ) | [virtual] |
| LogicConnector* LogicTarget::getConnector | ( | ) | [inline, virtual] |
| 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] |
| 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.
WaveSound * LogicTarget::badSound [protected] |
int LogicTarget::colors[4] [protected] |
int* LogicTarget::expected [protected] |
Graphic* LogicTarget::glow [protected] |
WaveSound* LogicTarget::goodSound [protected] |
LogicConnector* LogicTarget::input [protected] |
int LogicTarget::numReceived [protected] |
int LogicTarget::numTargets [protected] |
int* LogicTarget::received [protected] |
1.5.7.1