|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrobocode.naval.ComponentBase
robocode.naval.MineComponent
public class MineComponent
The class that represents the component on the Ship that drops a mine.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class robocode.naval.ComponentBase |
---|
ComponentBase.HiddenComponentHelper |
Field Summary |
---|
Fields inherited from class robocode.naval.ComponentBase |
---|
angle, lastHeading, type |
Constructor Summary | |
---|---|
MineComponent()
A constructor that creates a default MineComponent |
|
MineComponent(double x,
double y,
ComponentType type)
The constructor for the MineComponent |
|
MineComponent(Point2D pivot,
ComponentType type)
The constructor for the MineComponent |
Method Summary | |
---|---|
double |
getMineRecharge()
Basically the same as coolDown for weapons. |
byte |
getSerializeType()
|
void |
rechargeMine(double coolingRate)
Recharges your MineComponent. |
void |
setMineRecharge(double heat)
Sets the recharge heat for the MineComponent. |
double |
turnRadians(double turnRemaining)
Deprecated. |
Methods inherited from class robocode.naval.ComponentBase |
---|
equals, getAngle, getAngleDegrees, getColor, getGunHeat, getLastAngle, getOrigin, getPivot, getType, setAngle, setAngleDegrees, setColor, setLastAngle, setType, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MineComponent(double x, double y, ComponentType type)
MineComponent
x
- The x value relative to the pivot of the shipy
- The y value relative to the pivot of the shiptype
- The type of the component, see ComponentType
public MineComponent(Point2D pivot, ComponentType type)
MineComponent
pivot
- The x and y value of the component relative to the pivot of the ship.type
- The type of the component, see ComponentType
public MineComponent()
MineComponent
Method Detail |
---|
public void setMineRecharge(double heat)
heat
- MineComponent#rechargeMine(double coolingRate) rechargeMine()}
public double getMineRecharge()
public void rechargeMine(double coolingRate)
coolingRate
- The rate at which the mine is being recharged.@Deprecated public double turnRadians(double turnRemaining)
IComponent
turnRadians
in interface IComponent
turnRadians
in class ComponentBase
turnRemaining
- The angle in RADIANS the component still has to turn.
public byte getSerializeType()
getSerializeType
in interface IComponent
getSerializeType
in class ComponentBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |