📜  aabb碰撞java代码示例

📅  最后修改于: 2022-03-11 14:52:14.393000             🧑  作者: Mango

代码示例1
if(player1.x < player2.x + player2.width &&
    player1.x + player1.width > player2.x &&
    player1.y < player2.y + player2.height &&
    player1.y + player1.height > player2.y)
{
    System.out.println("Collision Detected");
}