public class RockfordModel extends DisplayableElementModel
Constructor and Description |
---|
RockfordModel()
Class constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
getHasExplosed()
Return true if rockford has exploded (you = lose)
|
boolean |
isCollisionDone()
Gets whether Rockford collision has been handled or not
|
boolean |
isRunningDown()
Gets whether Rockford is running down or not
|
boolean |
isRunningLeft()
Gets whether Rockford is running to the left or not
|
boolean |
isRunningRight()
Gets whether Rockford is running to the right or not
|
boolean |
isRunningUp()
Gets whether Rockford is running up or not
|
boolean |
isRunningUpOrDown()
Gets whether Rockford is running up or down, or not
|
boolean |
isStaying()
Gets whether Rockford is standing still or not
|
void |
setCollisionDone(boolean isCollisionDone)
Sets whether Rockford collision has been handled or not
|
void |
setHasExplosed(boolean hasExploded)
Set rockford exploded state
|
void |
setSpeed(int speed) |
void |
startRunningDown()
Rockford running down
|
void |
startRunningLeft()
Starts moving Rockford to the left
|
void |
startRunningRight()
Starts moving Rockford to the right
|
void |
startRunningUp()
Rockford running up
|
void |
startStaying()
Stops the Rockford movement
|
void |
update(long time)
Updates the sprite animation
(And only that single thing)
|
getCollideSound, getGroupName, getPathToSprite, getPriority, getSprite, getSpriteName, getStateValue, grabSprite, isAnimate, isConvertible, isDestructible, isFalling, isImpactExplosive, isMoving, loadSprite, setAnimate, setCollideSound, setConvertibleValue, setFalling, setImpactExplosive, setPriority, setSprite
public void setSpeed(int speed)
public void update(long time)
update
in class DisplayableElementModel
time
- Current time in millisecondspublic void startStaying()
public void startRunningLeft()
public void startRunningRight()
public void startRunningUp()
public void startRunningDown()
public boolean isCollisionDone()
public void setCollisionDone(boolean isCollisionDone)
isCollisionDone
- Rockford collision handled or notpublic boolean isStaying()
public boolean isRunningLeft()
public boolean isRunningRight()
public boolean isRunningUp()
public boolean isRunningDown()
public boolean isRunningUpOrDown()
public boolean getHasExplosed()
public void setHasExplosed(boolean hasExploded)
hasExploded
- Whether Rockford has exploded or not