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
a621fdcd
Commit
a621fdcd
authored
Mar 12, 2021
by
Li MingZhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: pos
parent
31c655ad
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
30 deletions
+20
-30
form.component.html
form/src/app/form/form.component.html
+1
-1
scene.js
play/assets/aks_cocos_001/script/scene.js
+19
-29
.DS_Store
publish/.DS_Store
+0
-0
.DS_Store
publish/publish/.DS_Store
+0
-0
No files found.
form/src/app/form/form.component.html
View file @
a621fdcd
...
...
@@ -58,7 +58,7 @@
<button
nz-button
nzType=
"dashed"
(
click
)="
addGroupBtnClick
()"
style=
"width: 150px; height: 55px; margin: 50px;"
>
<button
*
ngIf=
"item.groupArr?.length <= 4"
nz-button
nzType=
"dashed"
(
click
)="
addGroupBtnClick
()"
style=
"width: 150px; height: 55px; margin: 50px;"
>
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
添加题
</button>
...
...
play/assets/aks_cocos_001/script/scene.js
View file @
a621fdcd
...
...
@@ -94,7 +94,7 @@ cc.Class({
_animaResList
:
null
,
preloadItem
()
{
this
.
addPreloadImage
();
//
this.addPreloadAudio();
this
.
addPreloadAudio
();
// this.addPreloadAnima();
this
.
preload
();
},
...
...
@@ -130,26 +130,13 @@ cc.Class({
for
(
let
i
=
0
;
i
<
groupArr
.
length
;
i
++
)
{
this
.
_imageResList
.
push
({
url
:
groupArr
[
i
].
pic_url
||
''
});
}
}
},
addPreloadAudio
()
{
const
groupArr
=
this
.
data
.
groupArr
;
if
(
groupArr
)
{
for
(
let
i
=
0
;
i
<
groupArr
.
length
;
i
++
)
{
const
optionArr
=
groupArr
[
i
].
optionArr
;
for
(
let
j
=
0
;
j
<
optionArr
.
length
;
j
++
)
{
this
.
_audioResList
.
push
({
url
:
optionArr
[
j
].
audio_url
||
''
});
}
this
.
_audioResList
.
push
({
url
:
groupArr
[
i
].
audio_url
||
''
});
}
}
this
.
_audioResList
.
push
({
url
:
this
.
data
.
title_audio_url
||
''
});
},
addPreloadAnima
()
{
...
...
@@ -269,11 +256,11 @@ cc.Class({
initPosArr
()
{
this
.
posData
=
{
'
1
'
:
[[
0
,
0
]],
'
2
'
:
[[
-
50
,
150
],
[
5
0
,
-
150
]],
'
1
'
:
[[
10
0
,
0
]],
'
2
'
:
[[
-
50
,
150
],
[
20
0
,
-
150
]],
'
3
'
:
[[
-
50
,
150
],
[
50
,
-
150
],
[
350
,
0
]],
'
4
'
:
[[
-
250
,
130
],
[
-
100
,
-
150
],
[
125
,
150
],
[
3
00
,
-
130
]],
'
5
'
:
[[
-
2
50
,
130
],
[
-
200
,
-
180
],
[
25
,
150
],
[
130
,
-
130
],
[
350
,
5
0
]],
'
4
'
:
[[
-
150
,
130
],
[
0
,
-
150
],
[
225
,
150
],
[
4
00
,
-
130
]],
'
5
'
:
[[
-
2
00
,
170
],
[
-
100
,
-
180
],
[
125
,
150
],
[
230
,
-
150
],
[
470
,
2
0
]],
'
6
'
:
[[],
[],
[],
[],
[],
[]],
'
7
'
:
[[],
[],
[],
[],
[],
[],
[]],
}
...
...
@@ -502,7 +489,7 @@ cc.Class({
console
.
log
(
'
this.posData:
'
,
this
.
posData
);
const
key
=
arr
.
length
const
key
=
5
//
arr.length
const
posArr
=
this
.
posData
[
key
.
toString
()];
for
(
let
i
=
0
;
i
<
key
;
i
++
)
{
const
bottle
=
this
.
getBottle
(
arr
[
i
]);
...
...
@@ -529,7 +516,7 @@ cc.Class({
}
this
.
role
=
role
;
role
.
x
=
-
50
0
*
this
.
_mapScaleMin
;
role
.
x
=
-
47
0
*
this
.
_mapScaleMin
;
role
.
y
=
-
40
*
this
.
_mapScaleMin
;
role
.
baseX
=
role
.
x
;
...
...
@@ -663,7 +650,7 @@ cc.Class({
},
delayCall
(
time
,
cb
)
{
cc
.
tween
(
this
)
return
cc
.
tween
(
this
)
.
delay
(
time
)
.
call
(()
=>
{
if
(
cb
)
{
...
...
@@ -734,8 +721,6 @@ cc.Class({
this
.
roleBack
();
this
.
setLayer2ByData
();
this
.
hideSpeakIcon
();
this
.
layer1
.
active
=
false
;
this
.
layer2
.
active
=
true
;
...
...
@@ -756,6 +741,8 @@ cc.Class({
this
.
setLayer2Pic
(
data
);
this
.
setLayer2TeacherPanel
(
data
);
this
.
setLayer2StudentPanel
(
data
);
this
.
hideSpeakIcon
();
},
...
...
@@ -875,6 +862,7 @@ cc.Class({
},
speakTween
:
null
,
showSpeakIcon
()
{
if
(
this
.
isTeacher
)
{
...
...
@@ -885,11 +873,13 @@ cc.Class({
this
.
appear
(
this
.
speakIcon
,
0.5
)
playAudio
(
this
.
speakClip
);
const
tmpBottle
=
this
.
curBottle
;
this
.
delayCall
(
3
,
()
=>
{
if
(
tmpBottle
==
this
.
curBottle
)
{
this
.
hideSpeakIcon
();
}
if
(
this
.
speakTween
)
{
this
.
speakTween
.
stop
();
}
this
.
speakTween
=
this
.
delayCall
(
3
,
()
=>
{
this
.
hideSpeakIcon
();
this
.
speakTween
=
null
;
})
},
...
...
publish/.DS_Store
View file @
a621fdcd
No preview for this file type
publish/publish/.DS_Store
View file @
a621fdcd
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