| Modifier and Type | Field and Description |
|---|---|
| private static final int | BOTTOM_BORDER
Border at which player dies |
| private static final int | DOWNWARD_MOVEMENT
Movement made downwards when a border is hit |
| private long | frameDuration
The frame duration in milliseconds, i.e. how long any given frame of animation lasts |
| private int | frameNumber
The current frame of animation being displayed |
| private Sprite[] | frames
The animation frames |
| private Game | game
The game in which the entity exists |
| private long | lastFrameChange
The time since the last frame change took place |
| private static final int | LEFT_BORDER
Left border at which to shift direction |
| private float | moveSpeed
The speed at which the alient moves horizontally |
| private static final int | RIGHT_BORDER
Right border at which to shift direction |
| Access | Constructor and Description |
|---|---|
| public | AlienEntity(Game
The game in which this entity is being created game, int The intial x location of this alien x, int The intial y location of this alient y)Create a new alien entity |
| Modifier and Type | Method and Description |
|---|---|
| public void | collidedWith(Entity
The other entity other)Implements abstract org. |
| public void | doLogic()
Update the game logic related to aliens
|
| public void | move(long
The time that has elapsed since last move delta)Overrides org. |
| BOTTOM_BORDER | back to summary |
|---|---|
| private static final int BOTTOM_BORDER Border at which player dies | |
| DOWNWARD_MOVEMENT | back to summary |
|---|---|
| private static final int DOWNWARD_MOVEMENT Movement made downwards when a border is hit | |
| frameDuration | back to summary |
|---|---|
| private long frameDuration The frame duration in milliseconds, i.e. how long any given frame of animation lasts | |
| frameNumber | back to summary |
|---|---|
| private int frameNumber The current frame of animation being displayed | |
| frames | back to summary |
|---|---|
| private Sprite[] frames The animation frames | |
| game | back to summary |
|---|---|
| private Game game The game in which the entity exists | |
| lastFrameChange | back to summary |
|---|---|
| private long lastFrameChange The time since the last frame change took place | |
| LEFT_BORDER | back to summary |
|---|---|
| private static final int LEFT_BORDER Left border at which to shift direction | |
| moveSpeed | back to summary |
|---|---|
| private float moveSpeed The speed at which the alient moves horizontally | |
| RIGHT_BORDER | back to summary |
|---|---|
| private static final int RIGHT_BORDER Right border at which to shift direction | |
| AlienEntity | back to summary |
|---|---|
| public AlienEntity(Game game, int x, int y) Create a new alien entity
| |
| collidedWith | back to summary |
|---|---|
| public void collidedWith(Entity other) Implements abstract org. Notification that this alien has collided with another entity
| |
| doLogic | back to summary |
|---|---|
| public void doLogic() Overrides org. Update the game logic related to aliens | |
| move | back to summary |
|---|---|
| public void move(long delta) Overrides org. Request that this alien moved based on time elapsed
| |