|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectse.liu.student.kimgr905.tilegame.sprites.Sprite
se.liu.student.kimgr905.tilegame.sprites.Ship
se.liu.student.kimgr905.tilegame.sprites.Boss
se.liu.student.kimgr905.tilegame.sprites.Boss.Boss1
public static final class Boss.Boss1
Boss1 Follows the player on the x-axis and also moves up and down. The follow speed changes.
Has 3 types of weapons: 1. Double cannnons that shoots constantly but at a fairly slow rate. 2. A lazer. 3. A cone-shaped, frontal attack here called AimedShot.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class se.liu.student.kimgr905.tilegame.sprites.Boss |
|---|
Boss.Boss1 |
| Field Summary | |
|---|---|
private float |
AIMED_DX_MAX
|
private float |
AIMED_DX_MIN
|
private float |
AIMED_DY_MAX
|
private int |
AIMED_TIME
|
private boolean |
aimedDirection
|
private float |
aimedDx
|
private float |
aimedDy
|
private boolean |
aimedShot
|
private static float |
AWAKE_SPEED
|
private boolean |
cannonLeft
|
private boolean |
cannonRight
|
private int |
CHANGE_BACK
|
private int |
CHANGE_PATH
|
private int |
counter
|
private int |
DOUBLE_LEFT
|
private int |
DOUBLE_RIGHT
|
private static float |
FOLLOW_SPEED_FAST
|
private static float |
FOLLOW_SPEED_SLOW
|
private float |
followSpeed
|
private static int |
HIT_POINTS
|
private boolean |
lazer
|
private int |
LAZER_TIME
|
private int |
PEACE_TIME
|
private int |
shotCounter
|
static int |
SHOTPOS_XCENTER
Center x shot position. |
static int |
SHOTPOS_XLEFT
Left x shot position. |
static int |
SHOTPOS_XRIGHT
Right x shot position. |
static int |
SHOTPOS_Y
Y shot position. |
private static float |
SLEEP_SPEED
|
private int |
weaponCounter
|
| Fields inherited from class se.liu.student.kimgr905.tilegame.sprites.Sprite |
|---|
anim, STATE_DEAD, STATE_EXPLODING, STATE_NORMAL, STATE_SHOOTING |
| Constructor Summary | |
|---|---|
Boss.Boss1(Animation normal,
Animation exploding)
Creates a new Boss1 with the specified animations. |
|
| Method Summary | |
|---|---|
void |
changePath(Player player)
Makes the boss follow the player and also changes it's y-velocity based on the status of counter. |
float |
getAimedDx()
Returns the x-velocity of the aimed shot. |
float |
getAimedDy()
Returns the x-velocity of the aimed shot. |
void |
hit()
When the ship gets hit it loses a hitpoint. |
boolean |
isAimedShot()
Returns if aimedShot is true or false. |
boolean |
isCannonLeft()
Is cannonLeft true or false. |
boolean |
isCannonRight()
Is cannonRight true or false. |
boolean |
isLazer()
Is lazer true or false. |
void |
shoot()
Updates the shooting status for this boss. |
void |
wakeUp()
Awakens the ship. |
| Methods inherited from class se.liu.student.kimgr905.tilegame.sprites.Ship |
|---|
changePath, clone, getHitPoints, isAwake, setHitPoints, setState, update |
| Methods inherited from class se.liu.student.kimgr905.tilegame.sprites.Sprite |
|---|
getHeight, getImage, getState, getVelocityX, getVelocityY, getWidth, getX, getY, isAlive, setVelocityX, setVelocityY, setX, setY |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int HIT_POINTS
private static final float SLEEP_SPEED
private static final float AWAKE_SPEED
private static final float FOLLOW_SPEED_SLOW
private static final float FOLLOW_SPEED_FAST
private boolean lazer
private boolean aimedShot
private boolean cannonLeft
private boolean cannonRight
public static final int SHOTPOS_XLEFT
public static final int SHOTPOS_XCENTER
public static final int SHOTPOS_XRIGHT
public static final int SHOTPOS_Y
private final int CHANGE_PATH
private final int CHANGE_BACK
private float followSpeed
private int counter
private int weaponCounter
private final int LAZER_TIME
private final int AIMED_TIME
private final int PEACE_TIME
private int shotCounter
private final int DOUBLE_LEFT
private final int DOUBLE_RIGHT
private float aimedDx
private float aimedDy
private final float AIMED_DX_MIN
private final float AIMED_DY_MAX
private final float AIMED_DX_MAX
private boolean aimedDirection
| Constructor Detail |
|---|
public Boss.Boss1(Animation normal,
Animation exploding)
normal - normal animationexploding - exploding animation| Method Detail |
|---|
public void changePath(Player player)
changePath in class Shipplayer - the playerpublic void shoot()
shoot in class Shippublic void wakeUp()
Ship
wakeUp in class Shippublic void hit()
Ship
hit in class Shippublic boolean isLazer()
public boolean isAimedShot()
public boolean isCannonLeft()
public boolean isCannonRight()
public float getAimedDx()
public float getAimedDy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||