Commit 32ba80f2 authored by xiezhi's avatar xiezhi

移除游戏音效功能

- 删除音效资源加载代码
- 移除跳跃音效播放
- 移除金币收集音效播放
- 简化游戏体验,减少资源依赖
parent 22e90087
......@@ -22,9 +22,6 @@ k.loadSprite("coin", "https://kaboomjs.com/sprites/coin.png");
k.loadSprite("grass", "https://kaboomjs.com/sprites/grass.png");
k.loadSprite("steel", "https://kaboomjs.com/sprites/steel.png");
// 加载音效
k.loadSound("jump", "https://kaboomjs.com/sounds/jump.wav");
k.loadSound("coin", "https://kaboomjs.com/sounds/coin.wav");
/**
* 主菜单场景
......@@ -166,7 +163,6 @@ k.scene("game", () => {
k.onKeyPress("space", () => {
if (player.isGrounded()) {
player.jump(800); // 增加跳跃力
k.play("jump");
}
});
......@@ -183,7 +179,6 @@ k.scene("game", () => {
k.destroy(coin);
score += 10;
scoreLabel.text = `分数: ${score}`;
k.play("coin");
// 创建新金币(在更合理的高度)
k.add([
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment