From 1fc522bc8c4a96858223e597ced8fea94ba57874 Mon Sep 17 00:00:00 2001 From: niliara-edu Date: Wed, 25 Dec 2024 09:32:05 +0100 Subject: fixed background --- src/engine/screen.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/engine') diff --git a/src/engine/screen.js b/src/engine/screen.js index 173e285..e9e5ef4 100644 --- a/src/engine/screen.js +++ b/src/engine/screen.js @@ -89,10 +89,10 @@ export class Screen { isOffLimits(position, size) { return ( - position.x + size.x < 0 || - position.y + size.y < 0 || - position.x - size.x > this.viewport.x || - position.y - size.y > this.viewport.y + position.x + size.x / 2 < 0 || + position.y + size.y / 2 < 0 || + position.x - size.x / 2 > this.viewport.x || + position.y - size.y / 2 > this.viewport.y ) } } -- cgit v1.2.3