|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavoids.BasicSprite
javoids.Sprite
javoids.ShieldedSprite
javoids.Javoid
public final class Javoid
A javoid (asteroid like) object.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javoids.BasicSprite |
---|
BasicSprite.Collision, BasicSprite.Gravity |
Field Summary | |
---|---|
private static double |
CHANCE_HOMING
the chance this will be a homing sprite |
private static double |
CHANCE_IRREGULAR_SHAPE
the chance this javoid will be irregularly shaped |
private static double |
CHANCE_ROTATE
the chance this sprite will rotate |
private static double |
CHANCE_ROUND
the chance this javoid will be round (but not an image) |
protected static int |
DEFAULT_SIZE
the default size |
protected static int |
MAX_NUMBER
The maximum number of these sprites allowed in the game |
protected static int |
MAX_PARTS
the maximum number of parts the javoid will break into when exploded |
protected static int |
MAX_SIZE
the maximum size |
protected static int |
MIN_SIZE
the minimum size |
private static double |
ROTATION
the amount to rotate |
private static long |
serialVersionUID
This is the version used for serializing/deserializing (storing/retrieving) this object |
Fields inherited from class javoids.BasicSprite |
---|
size |
Constructor Summary | |
---|---|
Javoid(BasicSprite parent,
Health health,
Move move,
int _size)
Constructor |
Method Summary | |
---|---|
SpriteVector<Javoid> |
breakApart()
|
int |
getDefaultSize()
|
ImageMap.Name |
getImageNumber()
|
int |
getMaximumSize()
|
int |
getMinimumSize()
|
int |
modifyDamage(int _damage)
modify the sprite's damage level |
void |
setShape(Shapes.Shape _shape)
|
void |
setSize(int _size)
set the sprite's size |
Methods inherited from class javoids.ShieldedSprite |
---|
accelerate, collide, collisionDetected, draw, getMass, getShield, move, setDirection, setMove, setRotation, setShield, toString, turn |
Methods inherited from class javoids.Sprite |
---|
getAreas, getColors, getMultiplier, getOriginalImage, getShape, setAreas, setColors, setColors, setImage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
protected static final int MAX_NUMBER
protected static final int MAX_PARTS
protected static final int MAX_SIZE
protected static final int MIN_SIZE
protected static final int DEFAULT_SIZE
private static final double CHANCE_HOMING
private static final double CHANCE_ROTATE
private static final double CHANCE_IRREGULAR_SHAPE
private static final double CHANCE_ROUND
private static final double ROTATION
Constructor Detail |
---|
public Javoid(BasicSprite parent, Health health, Move move, int _size)
parent
- the parent of this spritehealth
- the health informationmove
- the movment information_size
- the size this should beMethod Detail |
---|
public int getMaximumSize()
public int getMinimumSize()
public int getDefaultSize()
public void setSize(int _size)
BasicSprite
setSize
in class Sprite
_size
- the size to set the sprite's size topublic void setShape(Shapes.Shape _shape)
setShape
in class Sprite
_shape
- the shape to use for drawing or area checkingpublic int modifyDamage(int _damage)
BasicSprite
modifyDamage
in class BasicSprite
_damage
- the damage caused to this sprite
public SpriteVector<Javoid> breakApart()
public ImageMap.Name getImageNumber()
getImageNumber
in class Sprite
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |