1
0
Fork 0

feat: draw left and right boundary

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
combat-scorched-earth-from-outer-space
André Jaenisch 2 years ago
parent 34d833f027
commit 39dbf7a04f
Signed by: ryuno-ki
GPG Key ID: 5A668E771F1ED854

@ -75,12 +75,12 @@ function tick () {
function createObjectsInWorld () {
astronaut = makeAstronaut()
const boundaryHeight = 2
const boundarySize = 2
boundaries.push(
makeBoundary({
x: 0,
y: canvas.height - boundaryHeight,
height: boundaryHeight,
y: canvas.height - boundarySize,
height: boundarySize,
width: canvas.width
})
)
@ -88,11 +88,29 @@ function createObjectsInWorld () {
boundaries.push(
makeBoundary({
x: 0,
y: 0 + boundaryHeight,
height: boundaryHeight,
y: 0 + boundarySize,
height: boundarySize,
width: canvas.width
})
)
boundaries.push(
makeBoundary({
x: 0 + boundarySize,
y: 0,
height: canvas.height,
width: boundarySize
})
)
boundaries.push(
makeBoundary({
x: canvas.width - boundarySize,
y: 0,
height: canvas.height,
width: boundarySize
})
)
}
/**

Loading…
Cancel
Save