public class OvalSprite extends Sprite
EXIT_POLICY_BOUNCE, EXIT_POLICY_DIE, EXIT_POLICY_STOP, EXIT_POLICY_WRAP| Constructor and Description |
|---|
OvalSprite(int w,
int h)
Creates a black oval.
|
OvalSprite(int w,
int h,
java.awt.Color c)
Creates a colored oval.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(java.awt.Graphics g)
This method is called by the SpritePanel to tell the sprite to draw itself.
|
java.awt.Color |
getColor() |
void |
setColor(java.awt.Color c)
Sets the color of the sprite.
|
contains, die, getDx, getDy, getExitPolicy, getHome, getSpriteHeight, getSpriteWidth, getX, getY, isDead, isImmuneToBullets, onDeath, prepareForNextFrame, randomVelocity, setDx, setDy, setExitPolicy, setImmuneToBullets, setLocation, setSpriteHeight, setSpriteWidth, setUseOvalForContains, setVelocity, setX, setYpublic OvalSprite(int w,
int h)
w - the width of the oval.h - the height of the oval.public OvalSprite(int w,
int h,
java.awt.Color c)
w - the width of the oval.h - the height of the oval.color - the color of the sprite. If this is null, then the sprite is black.public void draw(java.awt.Graphics g)
Spritepublic java.awt.Color getColor()
public void setColor(java.awt.Color c)