public class Asteroid extends MinorPlanet
minRadiusBlackHole, minRadiusBullet, minRadiusMinorPlanet, minRadiusShip, position, radius, velocity| Constructor and Description |
|---|
Asteroid(double positionX,
double positionY,
double velocityX,
double velocityY,
double radius)
Create a new Asteroid.
|
| Modifier and Type | Method and Description |
|---|---|
void |
collide(Entity other)
Method to resolve collisions between an Asteroid and another entity.
|
collideWithBoundarybounceOffEntity, 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, terminatepublic Asteroid(double positionX,
double positionY,
double velocityX,
double velocityY,
double radius)
throws java.lang.IllegalArgumentException
positionX - The x-coordinate of the asteroid.positionY - The y-coordinate of the asteroid.velocityX - The x-velocity of the asteroid.velocityY - The y-velocity of the asteroid.radius - The radius of the asteroid.java.lang.IllegalArgumentExceptionpublic void collide(Entity other)
collide in class MinorPlanet