# Raspberry | Raspberry Rocketeer Docs
Documentation for Raspberry Rocketeer Docs

# Class Raspberry

Raspberry class.

#### Hierarchy

- Entity
  - Raspberry

- Defined in Raspberry.ts:4

#####
Index

### Constructors

constructor

### Properties

_image
_velocity
gravity
lift
FILL
HEIGHT
WIDTH
maxVelocity
position

### Accessors

height
image
position
showHitbox
velocity
width

### Methods

applyGravity
boost
boundaryBottom
boundaryTop
draw
drawHitBox
drawObject
drawRocket
forceBoundaries
setPose
update

## Constructors

### constructor

- new Raspberry(image: string): Raspberry

- Constructs the Raspberry with fixed sizes.

  #### Parameters

  - ##### image: string

    Path to image

  #### Returns Raspberry

  Overrides Entity.constructor

  - Defined in Raspberry.ts:97

## Properties

### `Private` _image

_image: Image

Image for the raspberry.

- Defined in Raspberry.ts:27

### `Private` _velocity

_velocity: number = 0

Current speed.

- Defined in Raspberry.ts:21

### `Private` `Readonly` gravity

gravity: number = 1.314159265358979323846264338

Gravity applied.

- Defined in Raspberry.ts:15

### `Private` `Readonly` lift

lift: number = -20

Amount of lift applied when boosting.

- Defined in Raspberry.ts:9

### `Static` `Private` `Readonly` FILL

FILL: number = 0

Color.

- Defined in Raspberry.ts:57

### `Static` `Private` `Readonly` HEIGHT

HEIGHT: number = 70

Height.

- Defined in Raspberry.ts:51

### `Static` `Private` `Readonly` WIDTH

WIDTH: number = 180

Width.

- Defined in Raspberry.ts:45

### `Static` `Private` `Readonly` maxVelocity

maxVelocity: number = 100

Maximum velocity, so the raspberry doesn't get to infinite speed when boosting.

- Defined in Raspberry.ts:39

### `Static` `Private` position

position: Position

Position.

- Defined in Raspberry.ts:33

## 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 Raspberry.ts:79
- set image(path: any): void

- Sets the image by path.

  #### Parameters

  - ##### path: any

  #### Returns void

  - Defined in Raspberry.ts:87

### 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

### velocity

- get velocity(): number

- Gets the velocity.

  #### Returns number

  - Defined in Raspberry.ts:64
- set velocity(value: number): void

- Sets the velocity.

  #### Parameters

  - ##### value: number

  #### Returns void

  - Defined in Raspberry.ts:72

### 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

### `Private` applyGravity

- applyGravity(): void

- Lets the Raspberry fall to the ground

  #### Returns void

  - Defined in Raspberry.ts:114

### boost

- boost(): void

- Lets the raspberry jump.

  #### Returns void

  - Defined in Raspberry.ts:153

### `Private` boundaryBottom

- boundaryBottom(): void
- `Private`

  Forces the boundaries at the canvas' bottom.

  #### Returns void

  - Defined in Raspberry.ts:143

### `Private` boundaryTop

- boundaryTop(): void
- `Private`

  Forces the boundaries at the canvas' top.

  #### Returns void

  - Defined in Raspberry.ts:132

### draw

- draw(): void

- Draws raspberry.

  #### Returns void

  Overrides Entity.draw

  - Defined in Raspberry.ts:160

### `Private` drawHitBox

- drawHitBox(): void

- If enabled, draws the hitbox.

  #### Returns void

  - Defined in Raspberry.ts:188

### `Private` drawObject

- drawObject(): void
- `Private`

  Draws the rocket.

  #### Returns void

  - Defined in Raspberry.ts:172

### `Private` drawRocket

- drawRocket(): void

- Handles the drawing of the object.

  #### Returns void

  - Defined in Raspberry.ts:180

### `Private` forceBoundaries

- forceBoundaries(): void
- `Private`

  Limits the raspberry's movement to the shown canvas.

  #### Returns void

  - Defined in Raspberry.ts:123

### `Private` setPose

- setPose(): void
- `Private`

  Rotation and position of the rocket.

  #### Returns void

  - Defined in Raspberry.ts:198

### update

- update(): void

- Applies gravity and keeps the raspberry within the canvas.

  #### Returns void

  Overrides Entity.update

  - Defined in Raspberry.ts:106

Generated using TypeDoc