### Navigation

- index
- modules |
- previous |
- Pyskool 1.1.2 documentation »

# water

Defines the `Water` class.

class `water.``Water`(water_id, command_list_id, phases)

  A jet of water or sherry (as fired from a water pistol).

  Parameters: | water_id – The ID of the jet of liquid. command_list_id – The ID of the command list the jet of liquid will use. phases – The phases of animation the water will use after being fired from a water pistol.

  `get_command_list_id`(lesson_id)

    Return the ID of the command list used by the jet of liquid.

    Parameters: | lesson_id – The ID of the current lesson (ignored - water and sherry do not follow a timetable).

  `hit_cup`()

    Check whether the jet of liquid hit a cup, and fill the cup if so.

    Returns: | True if the liquid hit a cup, False otherwise.

  `hit_floor`()

    Return whether the jet of liquid hit the floor.

  `hit_plant`()

    Check whether the jet of liquid hit a plant, and if so, make the plant start growing if the liquid is water.

    Returns: | True if a plant was hit, False otherwise.

  `launch`(x, y, direction, liquid)

    Launch this jet of water or sherry from a starting point.

    Parameters: | x – The x-coordinate of the starting point. y – The y-coordinate of the starting point. direction – The direction the jet will travel. liquid – The type of liquid.

### Navigation

- index
- modules |
- previous |
- Pyskool 1.1.2 documentation »