Package view.bubbles.playerBubbles
Class PlayerBubbleView
java.lang.Object
view.bubbles.BubbleView
view.bubbles.playerBubbles.PlayerBubbleView
- Direct Known Subclasses:
EmptyBubbleView
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 Summary
FieldsFields inherited from class view.bubbles.BubbleView
animationIndex, animationReset, animationTick, bubbleModel, soundPlayed -
Constructor Summary
ConstructorsConstructorDescriptionPlayerBubbleView(BubbleModel bubbleModel) Constructs a PlayerBubbleView with the specified BubbleModel. -
Method Summary
Methods inherited from class view.bubbles.BubbleView
getBubbleModel, isActive, updateAnimationTick
-
Field Details
-
previousModelState
protected int previousModelState
-
-
Constructor Details
-
PlayerBubbleView
Constructs a PlayerBubbleView with the specified BubbleModel.- Parameters:
bubbleModel- the model for the bubble entity
-
-
Method Details
-
draw
Draws the player bubble on the screen.- Specified by:
drawin classBubbleView- Parameters:
g- the Graphics object to draw with
-
update
public void update()Updates the bubble's state and animation.- Specified by:
updatein classBubbleView
-