diff options
author | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2024-12-25 09:32:05 +0100 |
---|---|---|
committer | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2024-12-25 09:32:05 +0100 |
commit | 1fc522bc8c4a96858223e597ced8fea94ba57874 (patch) | |
tree | e7dc943a068d8d5ae7db0511348029700c8f767e /src/engine | |
parent | fe63ca3c64d2dd310268df7391ba6de5e9b7a2f2 (diff) |
fixed background
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/screen.js | 8 |
1 files changed, 4 insertions, 4 deletions
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 ) } } |