fr.enssat.BoulderDash.models

## Class RockfordModel

- java.lang.Object
- - fr.enssat.BoulderDash.models.DisplayableElementModel
  - - fr.enssat.BoulderDash.models.RockfordModel

    public class RockfordModel
    extends DisplayableElementModel

RockfordModel Represents the hero of the game.

Since:
  2015-06-19
Author:
  Colin Leverger <me@colinleverger.fr>

### Constructor Summary

Constructors
Constructor and Description
`RockfordModel()` Class constructor

### Method Summary

Methods
`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)

### Methods inherited from class fr.enssat.BoulderDash.models.DisplayableElementModel

`getCollideSound, getGroupName, getPathToSprite, getPriority, getSprite, getSpriteName, getStateValue, grabSprite, isAnimate, isConvertible, isDestructible, isFalling, isImpactExplosive, isMoving, loadSprite, setAnimate, setCollideSound, setConvertibleValue, setFalling, setImpactExplosive, setPriority, setSprite`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### RockfordModel

    public RockfordModel()

Class constructor

### Method Detail

#### setSpeed

    public void setSpeed(int speed)

#### update

    public void update(long time)

Updates the sprite animation (And only that single thing)

Overrides:
  `update` in class `DisplayableElementModel`
Parameters:
  `time` - Current time in milliseconds

#### startStaying

    public void startStaying()

Stops the Rockford movement

#### startRunningLeft

    public void startRunningLeft()

Starts moving Rockford to the left

#### startRunningRight

    public void startRunningRight()

Starts moving Rockford to the right

#### startRunningUp

    public void startRunningUp()

Rockford running up

#### startRunningDown

    public void startRunningDown()

Rockford running down

#### isCollisionDone

    public boolean isCollisionDone()

Gets whether Rockford collision has been handled or not

Returns:
  Rockford collision handled or not

#### setCollisionDone

    public void setCollisionDone(boolean isCollisionDone)

Sets whether Rockford collision has been handled or not

Parameters:
  `isCollisionDone` - Rockford collision handled or not

#### isStaying

    public boolean isStaying()

Gets whether Rockford is standing still or not

Returns:
  Rockford staying or not

#### isRunningLeft

    public boolean isRunningLeft()

Gets whether Rockford is running to the left or not

Returns:
  Rockford running to the left or not

#### isRunningRight

    public boolean isRunningRight()

Gets whether Rockford is running to the right or not

Returns:
  Rockford running to the right or not

#### isRunningUp

    public boolean isRunningUp()

Gets whether Rockford is running up or not

Returns:
  Rockford running up, or not

#### isRunningDown

    public boolean isRunningDown()

Gets whether Rockford is running down or not

Returns:
  Rockford running down, or not

#### isRunningUpOrDown

    public boolean isRunningUpOrDown()

Gets whether Rockford is running up or down, or not

Returns:
  Rockford running up or down, or not

#### getHasExplosed

    public boolean getHasExplosed()

Return true if rockford has exploded (you = lose)

Returns:
  Whether Rockford has exploded or not

#### setHasExplosed

    public void setHasExplosed(boolean hasExploded)

Set rockford exploded state

Parameters:
  `hasExploded` - Whether Rockford has exploded or not