# Class Pipe

Rectangular obstacle.

#### Hierarchy

- Entity
  - Pipe

#### Implements

- Collidable

- Defined in Pipe.ts:4

#####
Index

### Constructors

constructor

### Properties

_image

### Accessors

height
image
position
showHitbox
width

### Methods

collides
draw
move
update

## Constructors

### constructor

- new Pipe(positionX: number, width: number, height: number, image: string): Pipe

- Constructs the pipe.

  #### Parameters

  - ##### positionX: number

    starting x-Position

  - ##### width: number

    pipe width

  - ##### height: number

    pipe height

  - ##### image: string

    path to image.

  #### Returns Pipe

  Overrides Entity.constructor

  - Defined in Pipe.ts:35

## Properties

### `Private` _image

_image: Image

Pipe's image.

- Defined in Pipe.ts:9

## Accessors

### height

- get height(): number

- Get height.

  #### Returns number

  Inherited from Entity.height

  - Defined in Entity.ts:70
- set height(value: number): void

- Set height.

  #### Parameters

  - ##### value: number

  #### Returns void

  Inherited from Entity.height

  - Defined in Entity.ts:78

### image

- get image(): Image

- Gets the image.

  #### Returns Image

  - Defined in Pipe.ts:15
- set image(path: any): void

- Sets the image.

  #### Parameters

  - ##### path: any

    Path to image

  #### Returns void

  - Defined in Pipe.ts:23

### position

- get position(): Position

- Get position.

  #### Returns Position

  Inherited from Entity.position

  - Defined in Entity.ts:40
- set position(value: Position): void

- Set position.

  #### Parameters

  - ##### value: Position

  #### Returns void

  Inherited from Entity.position

  - Defined in Entity.ts:48

### showHitbox

- get showHitbox(): boolean

- Get the hitbox's visibility.

  #### Returns boolean

  Inherited from Entity.showHitbox

  - Defined in Entity.ts:85
- set showHitbox(value: boolean): void

- Set the hitbox's visibility.

  #### Parameters

  - ##### value: boolean

  #### Returns void

  Inherited from Entity.showHitbox

  - Defined in Entity.ts:93

### width

- get width(): number

- Get width.

  #### Returns number

  Inherited from Entity.width

  - Defined in Entity.ts:55
- set width(value: number): void

- Set width.

  #### Parameters

  - ##### value: number

  #### Returns void

  Inherited from Entity.width

  - Defined in Entity.ts:63

## Methods

### collides

- collides(o: Entity): boolean

- Determines when the pipe is colliding with another entity

  #### Parameters

  - ##### o: Entity

    other entity

  #### Returns boolean

  Implementation of Collidable.collides

  - Defined in Pipe.ts:68

### draw

- draw(): void

- Draws the pipe.

  #### Returns void

  Overrides Entity.draw

  - Defined in Pipe.ts:48

### move

- move(speed: number): void

- Moves the pipe to the lift with the given speed

  #### Parameters

  - ##### speed: number

    how fast the pipe moves

  #### Returns void

  - Defined in Pipe.ts:60

### update

- update(): void

- YAGNI.

  #### Returns void

  Overrides Entity.update

  - Defined in Pipe.ts:43

Generated using TypeDoc