Package view.entities

Class PlayerView

java.lang.Object
view.entities.PlayerView

public class PlayerView extends Object
The PlayerView class represents the view for a PlayerModel. It handles updating the player's animation, drawing the player, and playing sound effects.
  • Constructor Details

    • PlayerView

      public PlayerView(PlayerModel playerModel)
      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

      public void draw(Graphics2D g)
      Draws the player on the screen.
      Parameters:
      g - the Graphics2D object to draw with