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
62f31006
Commit
62f31006
authored
Aug 30, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f6ecede4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
MainScene.ts
egret/src/mainScene/MainScene.ts
+8
-1
soundCtrl2.ts
egret/src/soundCtrl2.ts
+3
-1
No files found.
egret/src/mainScene/MainScene.ts
View file @
62f31006
...
...
@@ -48,7 +48,7 @@ import { createData } from '../startScene/StartScene';
import
{
Loading2
}
from
'../something/uis/Loading2'
;
import
{
BonusTime
}
from
'../something/uis/BonusTime'
;
import
{
NetName
}
from
'../../libs/tw/enum/NetName'
;
import
{
playGameBg
}
from
'../soundCtrl2'
;
import
{
playGameBg
,
getGameBgOn
}
from
'../soundCtrl2'
;
const
aniClass
=
{
"BoomAni"
:
BoomAni
,
...
...
@@ -196,8 +196,15 @@ export default class MainScene extends Scene {
stepCircle
:
egret
.
Shape
;
//bonus Time 提示
bonusTime
:
BonusTime
;
initSound
(){
this
[
'soundBtn'
].
visible
=
getSoundOn
();
this
[
'soundOffBtn'
].
visible
=
!
getSoundOn
();
this
[
'musicBtn'
].
visible
=
getGameBgOn
();
this
[
'musicOffBtn'
].
visible
=
!
getGameBgOn
();
}
start
(
data
)
{
super
.
start
();
this
.
initSound
();
stopBg
();
playGameBg
();
//初始化索引信息
...
...
egret/src/soundCtrl2.ts
View file @
62f31006
let
bgOn
=
true
;
let
bgChannel
:
egret
.
SoundChannel
;
let
loading
=
false
;
export
const
getGameBgOn
=
()
=>
{
return
bgOn
}
export
const
toggleGameBg
=
()
=>
{
bgOn
=
!
bgOn
;
if
(
bgChannel
)
{
...
...
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