lab5copy
Class EyeballMyopic

java.lang.Object
  extended by lab5copy.Eyeball
      extended by lab5copy.EyeballMyopic
All Implemented Interfaces:
Fireable

public class EyeballMyopic
extends Eyeball
implements Fireable


Field Summary
 
Fields inherited from class lab5copy.Eyeball
location
 
Constructor Summary
EyeballMyopic(GraphicsPanel p, int x, int y)
          If no radius of myopia is specified, we can see everywhere
EyeballMyopic(GraphicsPanel p, int x, int y, int radius)
           
EyeballMyopic(GraphicsPanel panel, Point p, int radius)
           
 
Method Summary
 void aimAt(Point p)
          Cause the missile to aim at the specified point.
 Vector initialVelocity()
          Initial velocity of the missile.
 Point leavesFrom()
          Location from which the missile should launch
 void lookAt(int x, int y)
           
 void mouseMoved(GraphicsPanel p, int x, int y)
          This should not be required, because it is present in the superclass, but YOPS looks reflectively and won't find it as such, so it is repeated here.
 
Methods inherited from class lab5copy.Eyeball
getLookAtVector, getPupilAt, moveTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EyeballMyopic

public EyeballMyopic(GraphicsPanel p,
                     int x,
                     int y)
If no radius of myopia is specified, we can see everywhere

Parameters:
p -
x -
y -

EyeballMyopic

public EyeballMyopic(GraphicsPanel panel,
                     Point p,
                     int radius)

EyeballMyopic

public EyeballMyopic(GraphicsPanel p,
                     int x,
                     int y,
                     int radius)
Method Detail

aimAt

public void aimAt(Point p)
Description copied from interface: Fireable
Cause the missile to aim at the specified point.

Specified by:
aimAt in interface Fireable
Parameters:
p - The point at which to aim

lookAt

public void lookAt(int x,
                   int y)
Overrides:
lookAt in class Eyeball

mouseMoved

public void mouseMoved(GraphicsPanel p,
                       int x,
                       int y)
This should not be required, because it is present in the superclass, but YOPS looks reflectively and won't find it as such, so it is repeated here.

Parameters:
p -
x -
y -

initialVelocity

public Vector initialVelocity()
Description copied from interface: Fireable
Initial velocity of the missile.

Specified by:
initialVelocity in interface Fireable
Returns:
Vector showing the missile's direction

leavesFrom

public Point leavesFrom()
Description copied from interface: Fireable
Location from which the missile should launch

Specified by:
leavesFrom in interface Fireable
Returns:
the Point of departure