public class ObjectStatus
extends java.lang.Object
Environment
passed to Spaceship.getNextCommand(Environment)
and the status of other objects found by a level 5 (fully-detailed) radar sweep.Constructor and Description |
---|
ObjectStatus() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(ObjectStatus other) |
int |
getAxisMajorLength()
Gets the length of a Planet, BlackHole, or Nebula on its major axis.
|
int |
getAxisMinorLength()
Gets the length from the center of a Nebula that is perpendicular to the direction/rotation of the Nebula.
|
java.lang.String[] |
getCommandQueue()
Gets the list of
CommandNames your Ship is currently executing. |
double |
getEnergy()
Gets the current amount of energy this object has.
|
double |
getHealth()
Gets the current Health of this object.
|
double |
getHitRadius()
Gets the radius of the object needed for collision detection.
|
int |
getId()
Gets the object's Unique ID.
|
long |
getMass()
Gets this object's mass.
|
double |
getMaxEnergy()
Gets the maximum amount of energy this object could store.
|
double |
getMaxHealth()
Gets the maximum amount of health this object could have.
|
double |
getMaxShield()
Gets the maximum amount of Shields the Ship object could have.
|
double |
getMaxSpeed()
Gets the maximum speed this object can travel.
|
double |
getMovementDirection()
Get the actual direction of travel for this object.
|
java.lang.String |
getName()
Gets the name of a Ship object.
|
int |
getNumberStored()
Gets the number of cargo items carried by a Ship in a Game.
|
int |
getOrientation()
Gets the current Orientation of a Ship or Nebula.
|
int |
getOwnerId()
Gets the ID of the Owner of this object.
|
Point |
getPosition()
Gets the position of this object within the world (0, 0) is the upper-left and increases down and to the right.
|
int |
getPullStrength()
Gets the strength of the gravity or drag of a Planet, BlackHole or Nebula.
|
int |
getRadarRange()
Gets the radius from a Ship object that its radar can detect objects.
|
double |
getRechargeRate()
Gets the amount of energy this object restores per second.
|
int |
getRotationSpeed()
Gets the number of degrees this Ship can turn in a second (default is 120).
|
double |
getShieldLevel()
Gets the current Shield strength of a Ship.
|
double |
getSpeed()
Gets this object's current speed.
|
double |
getTimeAlive()
Gets the amount of time this object has lived in seconds.
|
java.lang.String |
getType()
String representation of the Type of Object.
|
double |
getValue()
Gets the point value worth of a Bubble, Bauble, or Ship in a Game.
|
boolean |
isInCelestialBody()
Is this object in a celestial object's body of effect?
|
boolean |
isSuccessful()
Was an object successfully scanned for a game? (Discovery Quest)
|
java.lang.String |
toString() |
public int getId()
public java.lang.String getType()
public double getTimeAlive()
public Point getPosition()
Point
.public double getSpeed()
public double getMaxSpeed()
public double getMovementDirection()
getOrientation()
public long getMass()
public double getHealth()
public double getMaxHealth()
public double getEnergy()
public double getMaxEnergy()
public double getRechargeRate()
public int getOrientation()
public int getRotationSpeed()
public double getShieldLevel()
public double getMaxShield()
public int getRadarRange()
public java.lang.String[] getCommandQueue()
CommandNames
your Ship is currently executing.
This is only provided for your own ship. (i.e. You can't see other ship's queues through radar.)
If the last command requested was a blocking command, it will have finished before this list is populated.public boolean isInCelestialBody()
getAxisMajorLength()
).
A celestial body will return true if it contains an object like a ship.public boolean isSuccessful()
public double getValue()
public int getNumberStored()
public double getHitRadius()
getPosition()
public int getPullStrength()
public int getAxisMajorLength()
For Planets and BlackHoles this length represents the size of the gravitational field around it. The getPullStrength()
method will tell you how much it will effect your ship.
For Nebula this length is oriented in the Nebula's direction/rotation see getOrientation()
and represents its major radius. If your ship is in the Nebula, it will slow down based on the getPullStrength()
amount.
public int getAxisMinorLength()
public int getOwnerId()
public java.lang.String getName()
getType()
)public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(ObjectStatus other)