Package view.bubbles.playerBubbles
Class EnemyBubbleView
java.lang.Object
view.bubbles.BubbleView
view.bubbles.playerBubbles.PlayerBubbleView
view.bubbles.playerBubbles.EmptyBubbleView
view.bubbles.playerBubbles.EnemyBubbleView
The EnemyBubbleView class represents the view for an
EnemyBubbleModel.
It handles updating the bubble's animation, drawing the bubble on the screen, and playing sound effects.-
Field Summary
Fields inherited from class view.bubbles.playerBubbles.PlayerBubbleView
previousModelStateFields inherited from class view.bubbles.BubbleView
animationIndex, animationReset, animationTick, bubbleModel, soundPlayed -
Constructor Summary
ConstructorsConstructorDescriptionEnemyBubbleView(BubbleModel bubbleModel) Constructs an EnemyBubbleView with the specified BubbleModel. -
Method Summary
Methods inherited from class view.bubbles.BubbleView
getBubbleModel, isActive, updateAnimationTick
-
Constructor Details
-
EnemyBubbleView
Constructs an EnemyBubbleView with the specified BubbleModel.- Parameters:
bubbleModel- the model for the bubble entity
-
-
Method Details
-
update
public void update()Updates the bubble's state and animation.- Overrides:
updatein classPlayerBubbleView
-
draw
Draws the enemy bubble on the screen.- Overrides:
drawin classEmptyBubbleView- Parameters:
g- the Graphics object to draw with
-