Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
libai
/
fsActive
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5696d1ff
authored
Sep 05, 2025
by
kaisa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:测试火箭升空倒计时音效
parent
9c7305b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
26 deletions
activeFt/luckySpace/index.html
activeFt/luckySpace/lib/default.js
activeFt/luckySpace/index.html
View file @
5696d1ff
...
...
@@ -409,13 +409,11 @@
$
(
".top-btn4"
).
css
(
"display"
,
"none"
);
$
(
".top-btn5"
).
css
(
"display"
,
"block"
);
mAudios
.
bgm
.
pause
();
bgMusicClick
();
});
$
(
".top-btn5"
).
on
(
"click"
,
function
()
{
$
(
".top-btn4"
).
css
(
"display"
,
"block"
);
$
(
".top-btn5"
).
css
(
"display"
,
"none"
);
mAudios
.
bgm
.
play
();
bgMusicClick
();
});
$
(
".back"
).
on
(
"click"
,
function
()
{
...
...
@@ -698,6 +696,7 @@
.removeClass("n0 n1 n2 n3 n4 n5 n6 n7 n8 n9")
.addClass("n" + numArr[1] + "");
layer.msg(numArr[0], "0!!!", numArr[0], "1!!!");
if (numArr[1] == 0 && numArr[1] == 3) {
// 倒计时3s的时候播放倒计时音效
clock();
...
...
activeFt/luckySpace/lib/default.js
View file @
5696d1ff
...
...
@@ -110,56 +110,59 @@ function appCollaboration(msg) {
}
}
catch
(
e
)
{}
}
//
背景音乐点击
function
bgMusicClick
()
{
//
判断背景音是否开启/关闭
function
isBgMusicClose
()
{
let
isMuted
=
mAudios
.
bgm
.
muted
;
if
(
isMuted
)
{
mAudios
.
betWin
.
muted
=
true
;
mAudios
.
betLose
.
muted
=
true
;
mAudios
.
clock
.
muted
=
true
;
mAudios
.
boom
.
muted
=
true
;
mAudios
.
rocket
.
muted
=
true
;
mAudios
.
water
.
muted
=
true
;
mAudios
.
betWin
.
stop
();
mAudios
.
betLose
.
stop
();
mAudios
.
clock
.
stop
();
mAudios
.
boom
.
stop
();
mAudios
.
rocket
.
stop
();
mAudios
.
water
.
stop
();
}
else
{
mAudios
.
betWin
.
muted
=
false
;
mAudios
.
betLose
.
muted
=
false
;
mAudios
.
clock
.
muted
=
false
;
mAudios
.
boom
.
muted
=
false
;
mAudios
.
rocket
.
muted
=
false
;
mAudios
.
water
.
muted
=
false
;
}
return
isMuted
;
}
// 露水音效
function
betSound
()
{
const
flag
=
isBgMusicClose
();
if
(
flag
)
{
return
;
}
mAudios
.
water
.
play
();
}
// 中奖音效
function
betWin
()
{
const
flag
=
isBgMusicClose
();
if
(
flag
)
{
return
;
}
mAudios
.
betWin
.
play
();
}
// 爆炸音效+未中奖音效
function
betLose
()
{
const
flag
=
isBgMusicClose
();
if
(
flag
)
{
return
;
}
mAudios
.
boom
.
play
();
mAudios
.
betLose
.
play
();
}
// 火箭升空音效
function
rocket
()
{
const
flag
=
isBgMusicClose
();
if
(
flag
)
{
return
;
}
mAudios
.
rocket
.
play
();
}
// 停止播放火箭升空音效
function
rocketStop
()
{
const
flag
=
isBgMusicClose
();
if
(
flag
)
{
return
;
}
mAudios
.
rocket
.
pause
();
}
// 倒计时音效
function
clock
()
{
const
flag
=
isBgMusicClose
();
if
(
flag
)
{
return
;
}
mAudios
.
clock
.
play
();
}
//
...
...
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