Robotcode  1.0
Target Class Reference

Implements some routines that are useful for having a reachin target. More...

#include <Target.h>

List of all members.

Public Member Functions

 Target ()
 constructor
 Target (TargetShape s)
 constructor with shape given
void draw ()
 draw on screen
void setColor (int c)
 sets color from table
void setShape (TargetShape c)
 sets shape
void explode (double speed)
 start explosion

Public Attributes

int color
 Color (numtable entry)
TargetShape shape
 shape of the target
Vector2D position
 position of target
Vector2D size
 size of target (mm)
double explodeState
 where in explosion are you?
double explodeSpeed
 explosion speed
bool isExplode
 is currently exploding?

Static Public Attributes

static double colors [5][3]

Detailed Description

Implements some routines that are useful for having a reachin target.

This can change the target in color and stores a position. The main feature is that it can explode visually


Constructor & Destructor Documentation

Target::Target ( )

constructor

Constructor doesn't do much, but sets the Target to be invisible

Target::Target ( TargetShape  s)

constructor with shape given

Constructor doesn't do much, but sets the Target to be invisible and sets the shape of it


Member Function Documentation

void Target::draw ( void  )

draw on screen

Draws the target and draws a number of lines if the target is exploding

void Target::setColor ( int  c)

sets color from table

set color from a color list

Parameters:
cis the whished color 0: black 1: white
See also:
Screen
void Target::setShape ( TargetShape  s)

sets shape

set shape

Parameters:
sis the whished shape
See also:
Screen
void Target::explode ( double  speed)

start explosion

Starts an explosion

Parameters:
speedcm/ms of the explosion

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