|
|
|
|
@ -432,6 +432,13 @@ class Game {
@@ -432,6 +432,13 @@ class Game {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function rectangleOverlap(rect1, rect2) { |
|
|
|
|
return rect1.x < rect2.x + rect2.w && |
|
|
|
|
rect1.x + rect1.w > rect2.x && |
|
|
|
|
rect1.y < rect2.y + rect2.h && |
|
|
|
|
rect1.y + rect1.h > rect2.y; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const game = new Game({ |
|
|
|
|
canvasId: 'canvas', |
|
|
|
|
chatInputId: 'msg', |
|
|
|
|
|