diff options
Diffstat (limited to 'src/engine/screen.js')
-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 ) } } |