Class PlayerBubbleProjectileView

java.lang.Object
view.projectiles.ProjectileView
view.projectiles.PlayerBubbleProjectileView

public class PlayerBubbleProjectileView extends ProjectileView
The PlayerBubbleProjectileView class represents the view of the PlayerBubbleProjectileModel class. It handles the drawing and animation of the bubble projectile.
  • Constructor Details

    • PlayerBubbleProjectileView

      public PlayerBubbleProjectileView(ProjectileModel projectileModel)
      Constructs a PlayerBubbleProjectileView with the specified ProjectileModel.
      Parameters:
      projectileModel - the model of the projectile
  • Method Details

    • draw

      public void draw(Graphics g)
      Draws the projectile on the screen.
      Specified by:
      draw in class ProjectileView
      Parameters:
      g - the Graphics object to draw the projectile
    • playSoundEffect

      protected void playSoundEffect()
      Plays the sound effect associated with the projectile.
      Specified by:
      playSoundEffect in class ProjectileView
    • 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:
      updateAnimationTick in class ProjectileView