Class PlayerBubbleView

java.lang.Object
view.bubbles.BubbleView
view.bubbles.playerBubbles.PlayerBubbleView
Direct Known Subclasses:
EmptyBubbleView

public abstract class PlayerBubbleView extends BubbleView
The PlayerBubbleView class is an abstract class that represents the view for a PlayerBubbleModel. It handles updating the bubble's animation and drawing the bubble on the screen.
  • Field Details

    • previousModelState

      protected int previousModelState
  • Constructor Details

    • PlayerBubbleView

      public PlayerBubbleView(BubbleModel bubbleModel)
      Constructs a PlayerBubbleView with the specified BubbleModel.
      Parameters:
      bubbleModel - the model for the bubble entity
  • Method Details

    • draw

      public abstract void draw(Graphics g)
      Draws the player bubble on the screen.
      Specified by:
      draw in class BubbleView
      Parameters:
      g - the Graphics object to draw with
    • update

      public void update()
      Updates the bubble's state and animation.
      Specified by:
      update in class BubbleView