Package view.projectiles
Class PlayerBubbleProjectileView
java.lang.Object
view.projectiles.ProjectileView
view.projectiles.PlayerBubbleProjectileView
The PlayerBubbleProjectileView class represents the view of the
PlayerBubbleProjectileModel class.
It handles the drawing and animation of the bubble projectile.-
Field Summary
Fields inherited from class view.projectiles.ProjectileView
animationIndex, animationTick, projectileManagerView, projectileModel -
Constructor Summary
ConstructorsConstructorDescriptionPlayerBubbleProjectileView(ProjectileModel projectileModel) Constructs a PlayerBubbleProjectileView with the specified ProjectileModel. -
Method Summary
Modifier and TypeMethodDescriptionvoidDraws the projectile on the screen.protected voidPlays the sound effect associated with the projectile.protected voidUpdates the animation tick and index for the projectile.Methods inherited from class view.projectiles.ProjectileView
getAnimation, getSpriteAmount, isActive, update
-
Constructor Details
-
PlayerBubbleProjectileView
Constructs a PlayerBubbleProjectileView with the specified ProjectileModel.- Parameters:
projectileModel- the model of the projectile
-
-
Method Details
-
draw
Draws the projectile on the screen.- Specified by:
drawin classProjectileView- Parameters:
g- the Graphics object to draw the projectile
-
playSoundEffect
protected void playSoundEffect()Plays the sound effect associated with the projectile.- Specified by:
playSoundEffectin classProjectileView
-
updateAnimationTick
protected void updateAnimationTick()Updates the animation tick and index for the projectile.The animation speed is adjusted based on the projectile speed and distance multipliers.
- Overrides:
updateAnimationTickin classProjectileView
-