Package view.itemsAndRewards
Class BubbleRewardView
java.lang.Object
view.itemsAndRewards.ItemView
view.itemsAndRewards.BubbleRewardView
The BubbleRewardView class represents the view for the
BubbleRewardModel.
It handles drawing the bubble reward item and playing audio effects when the item is collected.-
Field Summary
Fields inherited from class view.itemsAndRewards.ItemView
animationIndex, animationTick, itemManagerView, itemModel, soundPlayed -
Constructor Summary
ConstructorsConstructorDescriptionBubbleRewardView(ItemModel itemModel) Constructs a BubbleRewardView with the specified ItemModel. -
Method Summary
Modifier and TypeMethodDescriptionvoidPlays the audio effects for the bubble reward item when it is collected.voidDraws the bubble reward item on the screen.Methods inherited from class view.itemsAndRewards.ItemView
getItemModel, isActive, update, updateAnimationTick
-
Constructor Details
-
BubbleRewardView
Constructs a BubbleRewardView with the specified ItemModel.- Parameters:
itemModel- the model of the bubble reward item
-
-
Method Details
-
draw
Draws the bubble reward item on the screen. If the item is de-spawning, it draws the de-spawning animation. -
audioEffects
public void audioEffects()Plays the audio effects for the bubble reward item when it is collected. Ensures the sound is played only once.- Specified by:
audioEffectsin classItemView
-