robocode.control.snapshot
Interface IComponentSnapshot


public interface IComponentSnapshot


Method Summary
 double getAngle()
          Get the angle of the component; in radians.
 int getColor()
          Get the color of the component.
 double getGunHeat()
           
 IPaint getImage(IRenderImages manager)
          Get the image that the component uses.
 double getLastAngle()
           
 Point2D getPivot()
          Get the pivot point of the component as a Point2D object.
 byte getSerializeType()
           
 ComponentType getType()
          Get the type of the component.
 void paint(Graphics2D g, IRenderImages manager, ITransformable peer, boolean scanArcs)
          
 void render(Graphics2D g, ITransformable peer, boolean scanArcs)
          Do the component specific drawing in here.
 

Method Detail

getType

ComponentType getType()
Get the type of the component.

The types differ for each class and classes may have multiple types!

Returns:
The type of the component.

getPivot

Point2D getPivot()
Get the pivot point of the component as a Point2D object.

The point is relative to that of the ship.

Returns:
The pivot point of the component.

getAngle

double getAngle()
Get the angle of the component; in radians.

Returns:
The angle of the component; in radians.

getColor

int getColor()
Get the color of the component.

Returns:
The color of the component.

getGunHeat

double getGunHeat()

getSerializeType

byte getSerializeType()

getLastAngle

double getLastAngle()

getImage

IPaint getImage(IRenderImages manager)
Get the image that the component uses.

Returns:
The image of the specific component.

paint

void paint(Graphics2D g,
           IRenderImages manager,
           ITransformable peer,
           boolean scanArcs)


render

void render(Graphics2D g,
            ITransformable peer,
            boolean scanArcs)
Do the component specific drawing in here.

Parameters:
g - The device to draw too.
peer - The robot to whom the component belongs to.
scanArcs - Indicates whether or not to draw the scan arcs.


Copyright © 2015 Robocode. All Rights Reserved.