Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-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
崔立强
db-game-template
Commits
e2a614d7
Commit
e2a614d7
authored
Nov 09, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c073463f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
panelCtrl.ts
egret/libs/new_wx/ctrls/panelCtrl.ts
+2
-4
sceneCtrl.ts
egret/libs/new_wx/ctrls/sceneCtrl.ts
+2
-5
No files found.
egret/libs/new_wx/ctrls/panelCtrl.ts
View file @
e2a614d7
...
@@ -22,10 +22,8 @@ export default class PanelCtrl {
...
@@ -22,10 +22,8 @@ export default class PanelCtrl {
const
key
=
panel
.
skinKey
.
toLowerCase
();
const
key
=
panel
.
skinKey
.
toLowerCase
();
const
p
=
Promise
.
all
([
RES
.
getResAsync
(
`
${
key
}
_json`
),
RES
.
getResAsync
(
`
${
key
}
_png`
)]);
const
p
=
Promise
.
all
([
RES
.
getResAsync
(
`
${
key
}
_json`
),
RES
.
getResAsync
(
`
${
key
}
_png`
)]);
p
.
then
(()
=>
{
p
.
then
(()
=>
{
RES
.
getResByUrl
(
`
${
key
}
_json`
,
(
sheet
:
egret
.
SpriteSheet
)
=>
{
Loading
.
instace
.
hide
();
Loading
.
instace
.
hide
();
this
.
showAfterLoadAtlas
(
panel
,
data
);
this
.
showAfterLoadAtlas
(
panel
,
data
);
},
this
,
RES
.
ResourceItem
.
TYPE_SHEET
);
})
})
}
else
{
}
else
{
this
.
showAfterLoadAtlas
(
panel
,
data
);
this
.
showAfterLoadAtlas
(
panel
,
data
);
...
...
egret/libs/new_wx/ctrls/sceneCtrl.ts
View file @
e2a614d7
...
@@ -20,17 +20,14 @@ export default class SceneCtrl {
...
@@ -20,17 +20,14 @@ export default class SceneCtrl {
if
(
!
window
[
'development'
])
{
if
(
!
window
[
'development'
])
{
Loading
.
instace
.
show
();
Loading
.
instace
.
show
();
const
key
=
scene
.
skinKey
.
toLowerCase
();
const
key
=
scene
.
skinKey
.
toLowerCase
();
const
p
=
Promise
.
all
([
const
p
romise
=
Promise
.
all
([
RES
.
getResAsync
(
`
${
key
}
_json`
),
RES
.
getResAsync
(
`
${
key
}
_json`
),
RES
.
getResAsync
(
`
${
key
}
_png`
),
RES
.
getResAsync
(
`
${
key
}
_png`
),
RES
.
getResAsync
(
`
${
key
}
scenebg_jpg`
)]);
RES
.
getResAsync
(
`
${
key
}
scenebg_jpg`
)]);
p
.
then
(()
=>
{
promise
.
then
(()
=>
{
// this.loadAtlasAndBg(scene, () => {
this
.
showAfterLoadAtlas
(
scene
,
data
,
onComplete
);
this
.
showAfterLoadAtlas
(
scene
,
data
,
onComplete
);
// })
});
});
}
else
{
}
else
{
this
.
showAfterLoadAtlas
(
scene
,
data
,
onComplete
);
this
.
showAfterLoadAtlas
(
scene
,
data
,
onComplete
);
}
}
}
}
...
...
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