|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavoids.BasicSprite
javoids.Sprite
javoids.Shield
public final class Shield
A sprite class to provide a shield to another sprite, protecting it from damage.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javoids.BasicSprite |
---|
BasicSprite.Collision, BasicSprite.Gravity |
Field Summary | |
---|---|
private static double |
CHANCE_ROTATE
the chance the sprite will rotate |
protected static int |
DEFAULT_AGING_RATE
the default rate that the sprite ages |
protected static int |
DEFAULT_DURATION
the default duration |
private static int |
DEFAULT_SIZE
the sprite's default size |
protected static int |
MAX_DEATHS
the maximum number of lives |
protected static int |
MAX_DURATION
the maximum duration |
protected static int |
MAX_NUMBER
The maximum number of these sprites allowed in the game |
protected static int |
MAX_SIZE
the sprite's maximum size |
protected static int |
MAXIMUM_DAMAGE_CAPACITY
the maximum damage elvel |
protected static int |
MIN_SIZE
the sprite's minimum size |
private static double |
ROTATION
the amount to rotate by |
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 | |
---|---|
Shield(BasicSprite parent,
Health health,
Move move,
int _size,
Shapes.Shape shieldShape)
Constructor |
Method Summary | |
---|---|
java.util.Vector<java.awt.Color> |
getColors()
|
int |
getDefaultSize()
|
ImageMap.Name |
getImageNumber()
|
int |
getMaximumSize()
|
int |
getMinimumSize()
|
void |
setSize(int _size)
set the sprite's size |
Methods inherited from class javoids.Sprite |
---|
draw, getAreas, getMultiplier, getOriginalImage, getShape, setAreas, setColors, setColors, setImage, setShape, toString |
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_DEATHS
protected static final int MAXIMUM_DAMAGE_CAPACITY
protected static final int MAX_DURATION
protected static final int DEFAULT_DURATION
protected static final int DEFAULT_AGING_RATE
protected static final int MAX_SIZE
protected static final int MIN_SIZE
private static final int DEFAULT_SIZE
private static final double CHANCE_ROTATE
private static final double ROTATION
Constructor Detail |
---|
public Shield(BasicSprite parent, Health health, Move move, int _size, Shapes.Shape shieldShape)
parent
- the parent of this spritehealth
- the health informationmove
- the movment information_size
- the size this should beshieldShape
- the shield's shapeMethod 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 java.util.Vector<java.awt.Color> getColors()
getColors
in class Sprite
public ImageMap.Name getImageNumber()
getImageNumber
in class Sprite
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |