Class WaterFlowView

java.lang.Object
view.bubbles.specialBubbles.WaterFlowView

public class WaterFlowView extends Object
The WaterFlowView class represents the view for a WaterFlowModel. It handles updating the water flow's animation and drawing the water flow on the screen.
  • Constructor Details

    • WaterFlowView

      public WaterFlowView(WaterFlowModel waterFlowModel)
      Constructs a WaterFlowView with the specified WaterFlowModel.
      Parameters:
      waterFlowModel - the model for the water flow entity
  • Method Details

    • draw

      public void draw(Graphics g)
      Draws the water flow on the screen, and plays sound if needed.
      Parameters:
      g - the Graphics object to draw with
    • isActive

      protected boolean isActive()
      Checks if the water flow is active.
      Returns:
      true if the water flow is active, false otherwise
    • getWaterFlowModel

      public Object getWaterFlowModel()
      Returns the water flow model.
      Returns:
      the water flow model