public class Asteroid
extends java.awt.Polygon
GameBoard
,
Serialized FormModifier and Type | Field and Description |
---|---|
private int |
asteroidHeight |
static java.util.ArrayList<Asteroid> |
asteroids |
private static int |
asteroidsDestroyed |
private int |
asteroidWidth |
private int |
height |
(package private) boolean |
onScreen |
private static int[] |
sPolyXArray |
private static int[] |
sPolyYArray |
private static int |
timesExploded |
private int |
uLeftXPos |
private int |
uLeftYPos |
private int |
width |
private int |
xDirection |
private int |
yDirection |
Constructor and Description |
---|
Asteroid(int[] polyXArray,
int[] polyYArray,
int pointsInPoly,
int randomStartXPos,
int randomStartYPos) |
Modifier and Type | Method and Description |
---|---|
java.awt.Rectangle |
getBounds() |
static int[] |
getPolyXArray(int randomStartXPos) |
static int[] |
getPolyYArray(int randomStartYPos) |
static int[] |
getStartingPolyXArray() |
static int[] |
getStartingPolyYArray() |
void |
move(SpaceShip spaceShip,
java.util.ArrayList<Laser> lasers) |
static void |
resetAsteroidsDestroyed() |
static void |
resetTimesExploded() |
private int uLeftXPos
private int uLeftYPos
private int xDirection
private int yDirection
private static int asteroidsDestroyed
private static int timesExploded
boolean onScreen
private int width
private int height
private int asteroidWidth
private int asteroidHeight
private static int[] sPolyXArray
private static int[] sPolyYArray
public static java.util.ArrayList<Asteroid> asteroids
public Asteroid(int[] polyXArray, int[] polyYArray, int pointsInPoly, int randomStartXPos, int randomStartYPos)
public static int[] getStartingPolyXArray()
public static int[] getStartingPolyYArray()
public static void resetAsteroidsDestroyed()
public static void resetTimesExploded()
public java.awt.Rectangle getBounds()
getBounds
in interface java.awt.Shape
getBounds
in class java.awt.Polygon
public static int[] getPolyXArray(int randomStartXPos)
public static int[] getPolyYArray(int randomStartYPos)