All Packages Class Hierarchy This Package Previous Next Index
Class com.loki3.cyber.pawn.ScannerPerfect
java.lang.Object
|
+----com.loki3.pa.Item
|
+----com.loki3.cyber.pawn.UnitClass
|
+----com.loki3.cyber.pawn.Scanner
|
+----com.loki3.cyber.pawn.ScannerPerfect
- public class ScannerPerfect
- extends Scanner
A perfect scanner reports all visible units within
the range of the scanner. Call scan() to get a
list of the scanned units.
scanner.scan();
ScannedList pawns = scanner.getPawns();
for (int i=0; i<pawns.getCount(); i++)
{
ScannedUnit unit = pawns.getUnit(i);
...check how close is it...
}
-
ScannerPerfect()
-
-
getMaker()
- object which can publicly create us
-
getMaxSight()
- Get the maximum distance scanner can see.
-
getObstacles()
- Get the list of all obstacles which were found in the last call to scan().
-
getPawns()
- Get the list of all pawns which were found in the last call to scan().
-
scan()
- Scans for surrounding units, then use
getPawns & getObstacles to find the results
ScannerPerfect
public ScannerPerfect()
getMaker
public static java.lang.Object getMaker()
object which can publicly create us
scan
public void scan()
Scans for surrounding units, then use
getPawns & getObstacles to find the results
getPawns
public ScannedList getPawns()
Get the list of all pawns which were found in the last call to scan().
getObstacles
public ScannedList getObstacles()
Get the list of all obstacles which were found in the last call to scan().
getMaxSight
public double getMaxSight()
Get the maximum distance scanner can see.
- Returns:
- 0 means scanner can see everything
All Packages Class Hierarchy This Package Previous Next Index