home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Revista CD Expert 51
/
PCGamer51_17Demos.iso
/
games
/
colobotdemo
/
colobotdemo10e.exe
/
script
/
tradar1.txt
< prev
next >
Wrap
Text File
|
2001-06-10
|
372b
|
26 lines
extern void object::Solution( )
{
while ( true )
{
object spot;
float dir;
spot = radar(WayPoint);
if ( spot == null ) // plus rien ?
{
motor(0, 0); // stoppe
break;
}
dir = direction(spot.position);
if ( dir < 0 ) // α droite ?
{
motor(1, 1+dir/90);
}
else // α gauche ?
{
motor(1-dir/90, 1);
}
}
}