Type: public
void
Set whether the drawer should generate its own asteroids at a set interval.
Parameter Name | Description |
---|---|
shouldMakeAsteroids | Whether the drawer should generate its own asteroids. |
Type: public
void
Make a new asteroid. Like magic.
Type: public
int
Returned Value: The amount of asteroids currently visible on the screen.
Type: public
AsteroidData
Determine if there is an asteroid intersecting the given position on the canvas; if so, return it.
Parameter Name | Description |
---|---|
position | The position Rect to check if an asteroid intersects. |
Returned Value: The AsteroidData if it intersects the given position; null if there is nothing there.
Type: public
void
Destroy a given asteroid; generate an explosion of particles in its place.
Parameter Name | Description |
---|---|
asteroid | The asteroid to obliterate. Kaboom! Kablowie! Kapow! Badabadoosh! |