Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kaboomjs-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eazy-template
kaboomjs-template
Commits
32ba80f2
Commit
32ba80f2
authored
Sep 17, 2025
by
xiezhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除游戏音效功能
- 删除音效资源加载代码 - 移除跳跃音效播放 - 移除金币收集音效播放 - 简化游戏体验,减少资源依赖
parent
22e90087
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
5 deletions
+0
-5
game.js
game.js
+0
-5
No files found.
game.js
View file @
32ba80f2
...
...
@@ -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
([
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment