Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dc_cocos001
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
dc_cocos001
Commits
8c2e51db
Commit
8c2e51db
authored
Mar 22, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
b7be153b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
83 deletions
+27
-83
dc_cocos001.fire
assets/dc_cocos001/scene/dc_cocos001.fire
+9
-9
dc_cocos001.ts
assets/dc_cocos001/scene/dc_cocos001.ts
+18
-74
No files found.
assets/dc_cocos001/scene/dc_cocos001.fire
View file @
8c2e51db
...
...
@@ -1365,7 +1365,7 @@
"__id__": 5
},
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 29
...
...
@@ -2451,7 +2451,7 @@
"__id__": 45
},
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 49
...
...
@@ -2632,7 +2632,7 @@
"__id__": 45
},
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 53
...
...
@@ -2907,7 +2907,7 @@
"__id__": 45
},
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 59
...
...
@@ -3001,7 +3001,7 @@
"__id__": 45
},
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 61
...
...
@@ -3182,7 +3182,7 @@
"__id__": 45
},
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 65
...
...
@@ -3363,7 +3363,7 @@
"__id__": 45
},
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 69
...
...
@@ -4977,7 +4977,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "1
bkPsMXfFOgI5nesFGYJZm
"
"_id": "1
f/1wwfpJKz7oRaAt1i5eg
"
},
{
"__type__": "cc.Label",
...
...
@@ -5012,7 +5012,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "
b8SsUATeVO3bqxJZtzowZR
"
"_id": "
88i6iWfHJDmrVUzD2Pnpoj
"
},
{
"__type__": "cc.RichText",
...
...
assets/dc_cocos001/scene/dc_cocos001.ts
View file @
8c2e51db
...
...
@@ -55,16 +55,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
recording
.
zIndex
=
999
this
.
recording
.
active
=
false
// this.setcoordinate(this.recording)
this
.
recording
.
getChildByName
(
"
stop
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
start
"
).
active
=
true
;
this
.
recording
.
getChildByName
(
"
good
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
Try
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
DB
"
).
active
=
true
this
.
recording
.
getChildByName
(
"
again
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
skip
"
).
active
=
false
this
.
gameStart
();
}
onSizeChanged
()
{
cc
.
director
.
loadScene
(
cc
.
director
.
getScene
().
name
);
...
...
@@ -240,32 +235,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
soundcount
=
0
recordingEvent
(
e
,
state
)
{
this
.
playAudio
(
"
btn
"
);
if
(
state
==
"
0
"
)
{
//
this
.
recording
.
getChildByName
(
"
stop
"
).
active
=
true
this
.
recording
.
getChildByName
(
"
start
"
).
active
=
false
;
(
<
any
>
window
).
courseware
&&
(
<
any
>
window
).
courseware
.
startTest
(
this
.
answerRightarr
[
0
])
if
(
""
==
this
.
answerRightarr
[
0
])
{
this
.
recording
.
getChildByName
(
"
Label
"
).
getComponent
(
cc
.
Label
).
string
=
"
配置文件text字段是空
"
}
else
{
this
.
recording
.
getChildByName
(
"
Label
"
).
getComponent
(
cc
.
Label
).
string
=
""
}
console
.
log
(
'
this.answerRightarr
'
,
this
.
answerRightarr
);
}
else
{
let
self
=
this
if
((
<
any
>
window
).
courseware
)
{
(
<
any
>
window
).
courseware
.
stopTest
((
res
)
=>
{
// 这里面是一个评测对象,里面有各种维度的评分
this
.
log
(
"
这里面是一个评测对象,回调评分结果>>>
"
+
res
)
let
str
=
JSON
.
parse
(
res
)
this
.
conclusion
(
str
.
result
.
overall
)
});
}
else
{
this
.
conclusion
(
6
)
}
this
.
log
(
"
完成====
"
);
}
}
conclusion
(
grade
)
{
...
...
@@ -275,38 +246,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
else
{
this
.
recording
.
getChildByName
(
"
Try
"
).
active
=
true
this
.
playAudio
(
"
again
"
)
this
.
soundcount
++
if
(
this
.
soundcount
<=
1
)
{
this
.
scheduleOnce
(()
=>
{
if
(
!
this
.
node
.
isValid
)
return
this
.
recording
.
getChildByName
(
"
Try
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
stop
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
start
"
).
active
=
true
;
},
2
)
}
else
{
this
.
scheduleOnce
(()
=>
{
if
(
!
this
.
node
.
isValid
)
return
this
.
recording
.
getChildByName
(
"
Try
"
).
active
=
true
this
.
recording
.
getChildByName
(
"
stop
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
DB
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
again
"
).
active
=
true
this
.
recording
.
getChildByName
(
"
skip
"
).
active
=
true
},
2
)
}
return
}
this
.
recording
.
getChildByName
(
"
DB
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
stop
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
start
"
).
active
=
false
;
this
.
scheduleOnce
(()
=>
{
if
(
!
this
.
node
.
isValid
)
return
this
.
recording
.
active
=
false
this
.
recording
.
getChildByName
(
"
start
"
).
active
=
true
;
this
.
recording
.
getChildByName
(
"
good
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
Try
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
DB
"
).
active
=
true
this
.
recording
.
getChildByName
(
"
again
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
skip
"
).
active
=
false
this
.
over
()
},
2
)
}
...
...
@@ -324,15 +271,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
operation
(
e
,
state
)
{
this
.
playAudio
(
"
btn
"
);
this
.
recording
.
getChildByName
(
"
start
"
).
active
=
true
;
this
.
recording
.
getChildByName
(
"
good
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
Try
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
DB
"
).
active
=
true
this
.
recording
.
getChildByName
(
"
again
"
).
active
=
false
this
.
recording
.
getChildByName
(
"
skip
"
).
active
=
false
if
(
state
==
"
0
"
)
{
//再来一次
}
else
{
//跳过 继续游戏
this
.
soundcount
=
0
this
.
recording
.
active
=
false
this
.
over
()
}
...
...
@@ -394,21 +337,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
log
(
"
打完了=============
"
)
this
.
stopShowBalls
();
await
asyncDelay
(
2
);
// await this.showStar();
// this._status.currentRightNumber = 0;
// this._status.currentQuestionIdx++;
// if (this.isEndGame()) {
// this.onGameEnd();
// } else {
// await asyncDelay(1.5);
// await this.playQuestionAudio();
// this.startShowBalls();
// }
this
.
recording
.
active
=
true
this
.
soundcount
=
0
this
.
playAudio
(
"
tishi
"
)
this
.
recording
.
active
=
true
;
await
this
.
autoRecording
();
}
});
...
...
@@ -429,6 +359,20 @@ export default class SceneComponent extends MyCocosSceneComponent {
return
ball
;
}
async
autoRecording
()
{
const
courseware
=
(
<
any
>
window
).
courseware
;
if
(
!
courseware
)
{
this
.
conclusion
(
6
);
return
;
}
courseware
.
startTest
(
this
.
answerRightarr
[
0
]);
await
asyncDelay
(
5
);
courseware
.
stopTest
((
res
)
=>
{
// 这里面是一个评测对象,里面有各种维度的评分
let
str
=
JSON
.
parse
(
res
)
this
.
conclusion
(
str
.
result
.
overall
)
});
}
onBallClicked
(
answer
)
{
}
...
...
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