|
@@ -714,7 +714,7 @@ const update = (delta) => {
|
|
|
|
|
|
// 处理投篮逻辑(修改后)
|
|
|
const isShooting = gameState.click || gameState.spaceShoot; // 鼠标或键盘触发投篮
|
|
|
- if (isShooting && gameState.ballY <= 950) {
|
|
|
+ if (isShooting && gameState.ballY <= clientObj.value.height) {
|
|
|
if (gameState.balls.length < 1) {
|
|
|
const ball = new Ball(gameState.ballX + (93 / 2), gameState.ballY);
|
|
|
ball.drawAngle = gameState.ballAngle;
|