Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
wildfirecode13
xiaoxiaole
Commits
57f9a61e
Commit
57f9a61e
authored
Aug 29, 2019
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
240ddd18
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
default.res.json
egret/resource/default.res.json
+5
-0
BonusShootAni.ts
egret/src/something/anis/BonusShootAni.ts
+1
-1
soundCtrl.ts
egret/src/soundCtrl.ts
+2
-1
No files found.
egret/resource/default.res.json
View file @
57f9a61e
...
...
@@ -1522,6 +1522,11 @@
"url"
:
"assets/showoff1.jpg"
,
"type"
:
"image"
,
"name"
:
"showoff1_jpg"
},
{
"url"
:
"assets/sounds/bonusShoot.mp3"
,
"type"
:
"sound"
,
"name"
:
"bonusShoot_mp3"
}
]
}
\ No newline at end of file
egret/src/something/anis/BonusShootAni.ts
View file @
57f9a61e
...
...
@@ -41,7 +41,7 @@ export class BonusShootAni extends egret.DisplayObjectContainer {
.
to
({
x
:
p
[
0
],
y
:
p
[
1
]
},
300
)
.
call
(()
=>
{
callback
();
//
playSound(SoundType.bonusShoot)
playSound
(
SoundType
.
bonusShoot
)
this
.
shoot
.
visible
=
false
;
this
.
imageAni
.
visible
=
true
;
this
.
imageAni
.
play
(()
=>
{
...
...
egret/src/soundCtrl.ts
View file @
57f9a61e
...
...
@@ -30,7 +30,7 @@ export const playBg = async () => {
if
(
bgChannel
)
return
;
if
(
loading
)
return
;
loading
=
true
;
const
bg
=
await
RES
.
getResAsync
(
'
b
g_mp3'
);
const
bg
=
await
RES
.
getResAsync
(
'
mapB
g_mp3'
);
bgChannel
=
bg
.
play
();
loading
=
false
;
}
...
...
@@ -52,6 +52,7 @@ export enum SoundType {
fail
=
'fail'
,
playBg
=
'playBg'
,
line
=
'line'
,
bonusShoot
=
'bonusShoot'
,
}
export
const
playSound
=
(
type
:
SoundType
)
=>
{
...
...
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