Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LWD_3
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
LWD_3
Commits
ad05737d
Commit
ad05737d
authored
May 26, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 上报成绩
parent
c7a039ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
LWD_3.js
assets/LWD_3/scene/LWD_3.js
+4
-0
utils.js
assets/LWD_3/script/common/utils.js
+9
-0
No files found.
assets/LWD_3/scene/LWD_3.js
View file @
ad05737d
import
{
onHomeworkFinish
}
from
"
../script/common/util
"
;
/**
/**
* 游戏主逻辑
* 游戏主逻辑
*/
*/
...
@@ -160,6 +162,8 @@ var game = cc.Class({
...
@@ -160,6 +162,8 @@ var game = cc.Class({
this
.
playCatDragon
(
"
finish
"
)
this
.
playCatDragon
(
"
finish
"
)
this
.
_timeoutIds
.
push
(
setTimeout
(()
=>
{
this
.
_timeoutIds
.
push
(
setTimeout
(()
=>
{
LWD_3
.
speaker
.
inst
.
playEffect
(
LWD_3
.
enum
.
E_Audio
.
CatComplete
);
LWD_3
.
speaker
.
inst
.
playEffect
(
LWD_3
.
enum
.
E_Audio
.
CatComplete
);
// TODO 结束游戏,上报成绩
onHomeworkFinish
();
},
500
));
},
500
));
},
},
...
...
assets/LWD_3/script/common/utils.js
View file @
ad05737d
...
@@ -226,4 +226,13 @@ async function rabbonFall(node) {
...
@@ -226,4 +226,13 @@ async function rabbonFall(node) {
const
offsetX
=
RandomInt
(
-
200
,
200
)
*
time
;
const
offsetX
=
RandomInt
(
-
200
,
200
)
*
time
;
await
asyncTweenBy
(
node
,
time
,
{
x
:
offsetX
,
angle
:
offsetX
*
60
/
200
});
await
asyncTweenBy
(
node
,
time
,
{
x
:
offsetX
,
angle
:
offsetX
*
60
/
200
});
rabbonFall
(
node
);
rabbonFall
(
node
);
}
export
function
onHomeworkFinish
(
callback
=
null
,
data
=
null
)
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
middleLayer
.
getComponent
(
'
middleLayer
'
).
onHomeworkFinish
(
callback
,
data
);
}
else
{
console
.
log
(
'
onHomeworkFinish
'
);
}
}
}
\ No newline at end of file
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