change squareCollision.js for just detect the collision and let the dev code the reaction init by the collision. the collision detection detect if the object enter with the other by left/right/top/bottom.