public class Planetoid extends MinorPlanet
minRadiusBlackHole, minRadiusBullet, minRadiusMinorPlanet, minRadiusShip, position, radius, velocity| Constructor and Description |
|---|
Planetoid(double positionX,
double positionY,
double velocityX,
double velocityY,
double radius,
double totalTravelledDistance)
Create a new planetoid.
|
| Modifier and Type | Method and Description |
|---|---|
void |
collide(Entity other)
Resolve the collision of a Planetoid with another Entity.
|
double |
getTotalTravelledDistance()
Return the total distance travelled by this planetoid.
|
void |
move(double duration)
Move the planetoid a given amount of time.
|
void |
setTotalTravelledDistance(double totalTravelledDistance)
Set the travelle distance of this planetoid to a given distance.
|
void |
terminate()
Terminate the planetoid.
|
collideWithBoundarybounceOffEntity, getCollisionPositionWithBoundary, getDistanceBetween, getDistanceBetweenCenters, getMass, getMinRadius, getMinShipMass, getMovementPrediction, getPosition, getPositionCollisionWithEntity, getRadius, getSpeedOfLight, getTimeCollisionWithEntity, getTimeCollisionWithShip, getTimeToCollisionWithBoundary, getTotalVelocity, getVelocity, getWorld, isInRange, isTerminated, isValidRadius, overlap, removeWorld, setPosition, setRadius, setVelocity, setWorldpublic Planetoid(double positionX,
double positionY,
double velocityX,
double velocityY,
double radius,
double totalTravelledDistance)
throws java.lang.IllegalArgumentException
positionX - The x-coordinate of the planetoid.positionY - The y-coordinate of the planetoid.velocityX - The x-velocity of the planetoid.velocityY - The y-velocity of the planetoid.radius - The radius of the planetoid.totalTravelledDistance - The total distance the planetoid has already travelled.java.lang.IllegalArgumentExceptionpublic void setTotalTravelledDistance(double totalTravelledDistance)
totalTravelledDistance - The given distance.public double getTotalTravelledDistance()
public void move(double duration)
public void terminate()
public void collide(Entity other)
collide in class MinorPlanet