Abstract Protected constructorPrivate _heightHeight.
-Private _positionPosition.
-Private _showWhether the hitbox (rectangular surrounding) is shown, or not.
-Private _widthWidth.
-Private fillColor.
-Get height.
-Set height.
-Get the hitbox's visibility.
-Set the hitbox's visibility.
-Get width.
-Set width.
-Abstract updateGenerated using TypeDoc
Obstacle of the game. Built from 2 pipes, one at the bottom, one at the top.
-Constructs the Obstacle with the given image.
-starting position of the obstacle
-width of the obstacle
-height of the obstacle
-path to the image to be used
-Private Readonly paddingPrivate pipePrivate pipePrivate Readonly speedStatic Private _distanceStatic Private _startXGet height.
-Set height.
-Get the hitbox's visibility.
-Set the hitbox's visibility.
-Get width.
-Set width.
-Static distanceStatic startXPrivate createPrivate randomGenerated using TypeDoc
Rectangular obstacle.
-Private _imagePipe's image.
-Get height.
-Set height.
-Gets the image.
-Sets the image.
-Path to image
-Get the hitbox's visibility.
-Set the hitbox's visibility.
-Get width.
-Set width.
-Generated using TypeDoc
2D Point.
-Private _xX coordinate.
-Private _yY coordinate.
-Get x.
-Set x.
-Get y.
-Set y.
-Generated using TypeDoc
Raspberry class.
-Private _imageImage for the raspberry.
-Private _velocityCurrent speed.
-Private Readonly gravityGravity applied.
-Private Readonly liftAmount of lift applied when boosting.
-Static Private Readonly FILLColor.
-Static Private Readonly HEIGHTHeight.
-Static Private Readonly WIDTHWidth.
-Static Private Readonly maxMaximum velocity, so the raspberry doesn't get to infinite speed when boosting.
-Static Private positionPosition.
-Get height.
-Set height.
-Gets the image.
-Sets the image by path.
-Get the hitbox's visibility.
-Set the hitbox's visibility.
-Gets the velocity.
-Sets the velocity.
-Get width.
-Set width.
-Private applyPrivate boundaryPrivate boundaryPrivate drawPrivate drawPrivate drawPrivate forcePrivate setGenerated using TypeDoc
classDiagram
direction BT
class Collidable {
collides(o: Entity) boolean
}
class Entity {
constructor(position: Position, width: number, height: number, fill: number)
Position _position
number _width
number _height
number fill
boolean _showHitbox
update() void
draw() void
Position position
number width
number height
boolean showHitbox
}
class Obstacle {
constructor(position: Position, obstacleWidth: number, obstacleHeight: number, pipeImagePath: string)
Pipe pipeTop
Pipe pipeBottom
number padding
number speed
number _distanceBetweenPipes
number _startX
createPipes(position: Position, obstacleHeight: number, obstacleWidth: number, pipeImagePath: string) void
resetPosition() void
randomizeHeight() void
randomRange(min: number, max: number) number
update() void
draw() void
collides(o: Entity) boolean
any startX
any distanceBetweenPipes
}
class Pipe {
constructor(positionX: number, width: number, height: number, image: string)
p5.Image _image
update() void
draw() void
move(speed: number) void
collides(o: Entity) boolean
p5.Image image
}
class Position {
constructor(x: number, y: number)
number _x
number _y
number x
number y
}
class Raspberry {
constructor(image: string)
number lift
number gravity
number _velocity
p5.Image _image
Position position
number maxVelocity
number WIDTH
number HEIGHT
number FILL
update() void
applyGravity() void
forceBoundaries() void
boundaryTop() void
boundaryBottom() void
boost() void
draw() void
drawObject() void
drawRocket() void
drawHitBox() void
setPose() void
number velocity
p5.Image image
}
Obstacle ..> Collidable
Obstacle --> Entity
Pipe ..> Collidable
Pipe --> Entity
Raspberry --> Entity
-
-Generated using TypeDoc
Collide-able objects.
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
General rectangular entities.
-