Package view.entities
Class PlayerView
java.lang.Object
view.entities.PlayerView
The PlayerView class represents the view for a
PlayerModel.
It handles updating the player's animation, drawing the player, and playing sound effects.-
Constructor Summary
ConstructorsConstructorDescriptionPlayerView(PlayerModel playerModel) Constructs a PlayerView with the specified PlayerModel. -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(Graphics2D g) Draws the player on the screen.voidupdate()Updates the player's animation and sound effects.
-
Constructor Details
-
PlayerView
Constructs a PlayerView with the specified PlayerModel.- Parameters:
playerModel- the model for the player entity
-
-
Method Details
-
update
public void update()Updates the player's animation and sound effects. -
draw
Draws the player on the screen.- Parameters:
g- the Graphics2D object to draw with
-