Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_NJ_lite
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
middleLayer_for_NJ_lite
Commits
dd8645f7
Commit
dd8645f7
authored
Nov 07, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
封装异步
parent
edfb2551
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
33 deletions
+37
-33
middleLayer.ts
assets/middleLayer_for_NJ_lite/script/middleLayer.ts
+37
-33
No files found.
assets/middleLayer_for_NJ_lite/script/middleLayer.ts
View file @
dd8645f7
...
...
@@ -660,7 +660,7 @@ export default class NewClass extends middleLayerBase {
await
this
.
playGetParterAnim
();
if
(
this
.
isLogin
==
true
&&
this
.
gameModel
!=
'
free
'
)
{
this
.
unlockNextForder
();
await
this
.
unlockNextForder
();
}
}
...
...
@@ -686,38 +686,42 @@ export default class NewClass extends middleLayerBase {
star
.
active
=
true
;
star
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
'
normal
'
,
1
);
const
animData
=
this
.
getData
(
'
NJ_game_select
'
);
if
(
animData
&&
animData
.
folderCover
)
{
cc
.
assetManager
.
loadRemote
(
animData
.
folderCover
,
async
(
err
,
res
)
=>
{
const
apple
=
cc
.
find
(
'
middleLayer/coolcat/apple
'
);
apple
.
active
=
true
;
apple
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
res
);
const
sx
=
200
/
apple
.
width
;
const
sy
=
200
/
apple
.
height
;
const
sl
=
Math
.
min
(
sx
,
sy
);
apple
.
scale
=
sl
;
cc
.
tween
(
apple
)
.
set
({
scale
:
0
})
.
to
(
0.5
,
{
scale
:
sl
},
{
easing
:
'
backOut
'
})
.
to
(
0.1
,
{
angle
:
20
})
.
to
(
0.2
,
{
angle
:
-
20
})
.
to
(
0.1
,
{
angle
:
0
})
.
delay
(
1
)
.
to
(
0.1
,
{
angle
:
20
})
.
to
(
0.2
,
{
angle
:
-
20
})
.
to
(
0.1
,
{
angle
:
0
})
.
delay
(
1
)
.
to
(
0.1
,
{
angle
:
0
})
.
call
(()
=>
{
this
.
hideGetParterAnim
();
})
.
start
()
})
}
else
{
setTimeout
(()
=>
{
this
.
hideGetParterAnim
();
},
1000
);
}
return
new
Promise
((
resovle
,
reject
)
=>
{
const
animData
=
this
.
getData
(
'
NJ_game_select
'
);
if
(
animData
&&
animData
.
folderCover
)
{
cc
.
assetManager
.
loadRemote
(
animData
.
folderCover
,
async
(
err
,
res
)
=>
{
const
apple
=
cc
.
find
(
'
middleLayer/coolcat/apple
'
);
apple
.
active
=
true
;
apple
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
res
);
const
sx
=
200
/
apple
.
width
;
const
sy
=
200
/
apple
.
height
;
const
sl
=
Math
.
min
(
sx
,
sy
);
apple
.
scale
=
sl
;
cc
.
tween
(
apple
)
.
set
({
scale
:
0
})
.
to
(
0.5
,
{
scale
:
sl
},
{
easing
:
'
backOut
'
})
.
to
(
0.1
,
{
angle
:
20
})
.
to
(
0.2
,
{
angle
:
-
20
})
.
to
(
0.1
,
{
angle
:
0
})
.
delay
(
1
)
.
to
(
0.1
,
{
angle
:
20
})
.
to
(
0.2
,
{
angle
:
-
20
})
.
to
(
0.1
,
{
angle
:
0
})
.
delay
(
1
)
.
to
(
0.1
,
{
angle
:
0
})
.
call
(()
=>
{
resovle
(
true
);
this
.
hideGetParterAnim
();
})
.
start
()
})
}
else
{
setTimeout
(()
=>
{
resovle
(
true
);
this
.
hideGetParterAnim
();
},
1000
);
}
})
}
hideGetParterAnim
()
{
...
...
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