Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aks_cocos_001
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
aks_cocos_001
Commits
31c655ad
Commit
31c655ad
authored
Mar 12, 2021
by
Li MingZhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: online bug
parent
97b53cba
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
3 deletions
+25
-3
.DS_Store
.DS_Store
+0
-0
scene.js
play/assets/aks_cocos_001/script/scene.js
+25
-3
.DS_Store
publish/.DS_Store
+0
-0
.DS_Store
publish/publish/.DS_Store
+0
-0
No files found.
.DS_Store
View file @
31c655ad
No preview for this file type
play/assets/aks_cocos_001/script/scene.js
View file @
31c655ad
...
@@ -184,14 +184,20 @@ cc.Class({
...
@@ -184,14 +184,20 @@ cc.Class({
addServerListener
()
{
addServerListener
()
{
console
.
log
(
'
in addServerListener
'
);
const
c
=
window
.
courseware
;
const
c
=
window
.
courseware
;
if
(
!
c
)
{
if
(
!
c
)
{
return
;
return
;
}
}
console
.
log
(
'
in addServerListener 2 :
'
,
this
.
isTeacher
);
if
(
this
.
isTeacher
)
{
if
(
this
.
isTeacher
)
{
c
.
onEvent
(
'
show_cap
'
,
(
data
,
next
)
=>
{
c
.
onEvent
(
'
show_cap
'
,
(
data
,
next
)
=>
{
console
.
log
(
'
in show_cap event
'
,
data
);
this
.
showCapAnima
(
data
.
index
);
this
.
showCapAnima
(
data
.
index
);
next
();
next
();
});
});
...
@@ -204,6 +210,7 @@ cc.Class({
...
@@ -204,6 +210,7 @@ cc.Class({
});
});
c
.
onEvent
(
'
show_answer
'
,
(
data
,
next
)
=>
{
c
.
onEvent
(
'
show_answer
'
,
(
data
,
next
)
=>
{
console
.
log
(
'
in show_answer event
'
,
data
);
this
.
showStudentPanelLabel
(
data
.
isRight
);
this
.
showStudentPanelLabel
(
data
.
isRight
);
next
();
next
();
});
});
...
@@ -516,7 +523,10 @@ cc.Class({
...
@@ -516,7 +523,10 @@ cc.Class({
const
resDragonBone
=
cc
.
find
(
"
Canvas/res/anima/role
"
)
const
resDragonBone
=
cc
.
find
(
"
Canvas/res/anima/role
"
)
const
role
=
cc
.
instantiate
(
resDragonBone
)
const
role
=
cc
.
instantiate
(
resDragonBone
)
role
.
scale
=
this
.
_mapScaleMin
;
role
.
scale
=
this
.
_mapScaleMin
;
this
.
layer1
.
addChild
(
role
,
5
);
if
(
!
this
.
isTeacher
)
{
this
.
layer1
.
addChild
(
role
,
5
);
}
this
.
role
=
role
;
this
.
role
=
role
;
role
.
x
=
-
500
*
this
.
_mapScaleMin
;
role
.
x
=
-
500
*
this
.
_mapScaleMin
;
...
@@ -724,6 +734,7 @@ cc.Class({
...
@@ -724,6 +734,7 @@ cc.Class({
this
.
roleBack
();
this
.
roleBack
();
this
.
setLayer2ByData
();
this
.
setLayer2ByData
();
this
.
hideSpeakIcon
();
this
.
layer1
.
active
=
false
;
this
.
layer1
.
active
=
false
;
...
@@ -866,9 +877,20 @@ cc.Class({
...
@@ -866,9 +877,20 @@ cc.Class({
showSpeakIcon
()
{
showSpeakIcon
()
{
if
(
this
.
isTeacher
)
{
return
;
}
this
.
speakIcon
.
active
=
true
;
this
.
speakIcon
.
active
=
true
;
this
.
appear
(
this
.
speakIcon
,
0.5
)
this
.
appear
(
this
.
speakIcon
,
0.5
)
playAudio
(
this
.
speakClip
);
playAudio
(
this
.
speakClip
);
const
tmpBottle
=
this
.
curBottle
;
this
.
delayCall
(
3
,
()
=>
{
if
(
tmpBottle
==
this
.
curBottle
)
{
this
.
hideSpeakIcon
();
}
})
},
},
hideSpeakIcon
()
{
hideSpeakIcon
()
{
...
@@ -907,9 +929,9 @@ cc.Class({
...
@@ -907,9 +929,9 @@ cc.Class({
this
.
initPic
();
this
.
initPic
();
this
.
initTeacherPanel
();
this
.
initTeacherPanel
();
this
.
initStudentPanel
();
this
.
initStudentPanel
();
//
if (this.isTeacher) {
if
(
this
.
isTeacher
)
{
this
.
initTeacherBtn
();
this
.
initTeacherBtn
();
//
}
}
this
.
initSpeakIcon
();
this
.
initSpeakIcon
();
this
.
initWrongAndRightAnima
();
this
.
initWrongAndRightAnima
();
},
},
...
...
publish/.DS_Store
View file @
31c655ad
No preview for this file type
publish/publish/.DS_Store
View file @
31c655ad
No preview for this file type
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