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
2eb8b77b
Commit
2eb8b77b
authored
Sep 18, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
20ed613c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
MainBase.ts
egret/libs/new_wx/MainBase.ts
+20
-0
home.json
mock/happyclear/home.json
+1
-1
No files found.
egret/libs/new_wx/MainBase.ts
View file @
2eb8b77b
...
...
@@ -35,6 +35,8 @@ import MainScene from "../../src/mainScene/MainScene";
import
{
Loading2
}
from
"../../src/something/uis/Loading2"
;
import
Box2Panel
from
"../../src/panels/Box2Panel"
;
import
Prize2Panel
from
"../../src/panels/Prize2Panel"
;
import
{
stopBg
,
playBg
,
getBgOn
}
from
"../../src/soundCtrl"
;
import
{
stopGamebg
,
playGameBg
}
from
"../../src/soundCtrl2"
;
export
default
class
MainBase
extends
eui
.
UILayer
{
constructor
()
{
...
...
@@ -283,5 +285,23 @@ export default class MainBase extends eui.UILayer {
});
document
.
addEventListener
(
"visibilitychange"
,
()
=>
{
if
(
document
.
visibilityState
==
"visible"
)
{
if
(
getBgOn
()){
if
(
SceneCtrl
.
instance
.
currentScene
instanceof
MapScene
)
playBg
();
else
if
(
SceneCtrl
.
instance
.
currentScene
instanceof
MainScene
)
playGameBg
();
}
}
if
(
document
.
visibilityState
==
"hidden"
)
{
stopBg
();
stopGamebg
();
}
})
}
}
\ No newline at end of file
mock/happyclear/home.json
View file @
2eb8b77b
...
...
@@ -154,7 +154,7 @@
"num"
:
10
}
],
"remainEnargy"
:
0
,
"remainEnargy"
:
1
0
,
"askForEnergy"
:
false
,
"canReceiveTreasureBoxNum"
:
10
,
"nextRangeStarsNum"
:
150
...
...
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