# Entity | Raspberry Rocketeer Docs
Documentation for Raspberry Rocketeer Docs

# Class Entity`Abstract`

General rectangular entities.

#### Hierarchy

- Entity
  - Obstacle
  - Pipe
  - Raspberry

- Defined in Entity.ts:4

#####
Index

### Constructors

constructor

### Properties

_height
_position
_showHitbox
_width
fill

### Accessors

height
position
showHitbox
width

### Methods

draw
update

## Constructors

### `Protected` constructor

- new Entity(position: Position, width: number, height: number, fill: number): Entity

- Constructs the Entity.

  #### Parameters

  - ##### position: Position

    starting Position

  - ##### width: number

    entity width

  - ##### height: number

    entity height

  - ##### fill: number

    fill color

  #### Returns Entity

  - Defined in Entity.ts:105

## Properties

### `Private` _height

_height: number

Height.

- Defined in Entity.ts:21

### `Private` _position

_position: Position

Position.

- Defined in Entity.ts:9

### `Private` _showHitbox

_showHitbox: boolean

Whether the hitbox (rectangular surrounding) is shown, or not.

- Defined in Entity.ts:33

### `Private` _width

_width: number

Width.

- Defined in Entity.ts:15

### `Private` fill

fill: number

Color.

- Defined in Entity.ts:27

## Accessors

### height

- get height(): number

- Get height.

  #### Returns number

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

- Set height.

  #### Parameters

  - ##### value: number

  #### Returns void

  - Defined in Entity.ts:78

### position

- get position(): Position

- Get position.

  #### Returns Position

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

- Set position.

  #### Parameters

  - ##### value: Position

  #### Returns void

  - Defined in Entity.ts:48

### showHitbox

- get showHitbox(): boolean

- Get the hitbox's visibility.

  #### Returns boolean

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

- Set the hitbox's visibility.

  #### Parameters

  - ##### value: boolean

  #### Returns void

  - Defined in Entity.ts:93

### width

- get width(): number

- Get width.

  #### Returns number

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

- Set width.

  #### Parameters

  - ##### value: number

  #### Returns void

  - Defined in Entity.ts:63

## Methods

### draw

- draw(): void

- Draws the entity.

  #### Returns void

  - Defined in Entity.ts:121

### `Abstract` update

- update(): void

- Updates the entity.

  #### Returns void

  - Defined in Entity.ts:116

Generated using TypeDoc