Constructor and Description |
---|
AnimationModel_Lab12()
Constructs an animation model.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(ModelListener listener) |
void |
addSprite()
Adds a new sprite to the centre of the world
|
void |
advanceNextState() |
void |
drawCurrentState(java.awt.Graphics2D g) |
void |
drawSceneBackground(java.awt.Graphics2D g) |
void |
fireShooter() |
java.awt.Dimension |
getWorldDimension() |
int |
getWorldHeight() |
int |
getWorldWidth() |
void |
moveShooterDown() |
void |
moveShooterLeft() |
void |
moveShooterRight() |
void |
moveShooterUp() |
void |
notifyModelHasChanged() |
void |
repositionAllSpritesToCentre() |
void |
rotateShooterLeft() |
void |
rotateShooterRight() |
void |
setWorldHeight(int worldHeight) |
void |
setWorldWidth(int worldWidth) |
public AnimationModel_Lab12()
public int getWorldWidth()
getWorldWidth
in interface Model
public void setWorldWidth(int worldWidth)
public int getWorldHeight()
getWorldHeight
in interface Model
public void setWorldHeight(int worldHeight)
public void notifyModelHasChanged()
notifyModelHasChanged
in interface Model
public void advanceNextState()
advanceNextState
in interface Model
public void addListener(ModelListener listener)
addListener
in interface Model
public void drawCurrentState(java.awt.Graphics2D g)
drawCurrentState
in interface Model
public java.awt.Dimension getWorldDimension()
getWorldDimension
in interface Model
public void repositionAllSpritesToCentre()
repositionAllSpritesToCentre
in interface Model
public void drawSceneBackground(java.awt.Graphics2D g)
drawSceneBackground
in interface Model
public void addSprite()
public void moveShooterRight()
moveShooterRight
in interface Model
public void moveShooterLeft()
moveShooterLeft
in interface Model
public void moveShooterDown()
moveShooterDown
in interface Model
public void moveShooterUp()
moveShooterUp
in interface Model
public void fireShooter()
fireShooter
in interface Model
public void rotateShooterRight()
rotateShooterRight
in interface Model
public void rotateShooterLeft()
rotateShooterLeft
in interface Model