Package view.bubbles.specialBubbles
Class WaterFlowView
java.lang.Object
view.bubbles.specialBubbles.WaterFlowView
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 Summary
ConstructorsConstructorDescriptionWaterFlowView(WaterFlowModel waterFlowModel) Constructs a WaterFlowView with the specified WaterFlowModel. -
Method Summary
Modifier and TypeMethodDescriptionvoidDraws the water flow on the screen, and plays sound if needed.Returns the water flow model.protected booleanisActive()Checks if the water flow is active.
-
Constructor Details
-
WaterFlowView
Constructs a WaterFlowView with the specified WaterFlowModel.- Parameters:
waterFlowModel- the model for the water flow entity
-
-
Method Details
-
draw
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
Returns the water flow model.- Returns:
- the water flow model
-