minRadiusBlackHole, minRadiusBullet, minRadiusMinorPlanet, minRadiusShip, position, radius, velocity
Constructor and Description |
---|
MinorPlanet(double positionX,
double positionY,
double velocityX,
double velocityY,
double radius)
Create a new minor planet.
|
Modifier and Type | Method and Description |
---|---|
void |
collide(Entity other)
Resolve the collision of a MinorPlanet with another entity.
|
void |
collideWithBoundary()
Resolve the collision of a MinorPlanet with a boundary.
|
bounceOffEntity, getCollisionPositionWithBoundary, getDistanceBetween, getDistanceBetweenCenters, getMass, getMinRadius, getMinShipMass, getMovementPrediction, getPosition, getPositionCollisionWithEntity, getRadius, getSpeedOfLight, getTimeCollisionWithEntity, getTimeCollisionWithShip, getTimeToCollisionWithBoundary, getTotalVelocity, getVelocity, getWorld, isInRange, isTerminated, isValidRadius, move, overlap, removeWorld, setPosition, setRadius, setVelocity, setWorld, terminate
public MinorPlanet(double positionX, double positionY, double velocityX, double velocityY, double radius) throws java.lang.IllegalArgumentException
positionX
- The x-coordinate of the planet.positionY
- The y-coordinate of the planet.velocityX
- The x-velocity of the planet.velocityY
- The y-velocity of the planet.radius
- The radius of the planet.java.lang.IllegalArgumentException
public void collide(Entity other)
public void collideWithBoundary()
collideWithBoundary
in class Entity
superclass