Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy08_caici
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
hy08_caici
Commits
d2b6c858
Commit
d2b6c858
authored
Jun 27, 2023
by
LikG21
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改切换时间为3s
parent
bc5295c6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
12 deletions
+18
-12
hy06_danxuan.ts
assets/hy06_danxuan/scene/hy06_danxuan.ts
+7
-7
defaultData_hy06_danxuan.ts
assets/hy06_danxuan/script/defaultData_hy06_danxuan.ts
+3
-1
form.component.html
form/src/app/form/form.component.html
+3
-3
form.component.ts
form/src/app/form/form.component.ts
+5
-1
No files found.
assets/hy06_danxuan/scene/hy06_danxuan.ts
View file @
d2b6c858
...
@@ -158,8 +158,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -158,8 +158,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
nextQuestion
()
{
nextQuestion
()
{
// 游戏所需的初始化数据
// 游戏所需的初始化数据
this
.
currentId
=
0
this
.
currentId
=
0
this
.
time
=
this
.
data
.
options
.
length
*
5
this
.
time
=
this
.
data
.
options
.
length
*
3
console
.
log
(
this
.
time
,
'
456
'
)
this
.
startTime
=
this
.
time
*
1000
+
Date
.
now
()
this
.
startTime
=
this
.
time
*
1000
+
Date
.
now
()
this
.
countdownTime
=
"
60.00
"
this
.
countdownTime
=
"
60.00
"
this
.
lengthProgress
=
0
this
.
lengthProgress
=
0
...
@@ -185,7 +184,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -185,7 +184,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
countdownQuestion
(
topQuestion
)
{
countdownQuestion
(
topQuestion
)
{
let
countdown
=
pg
.
view
.
find
(
this
,
'
layer_game/countdown
'
);
let
countdown
=
pg
.
view
.
find
(
this
,
'
layer_game/countdown
'
);
var
chil
=
countdown
.
children
var
chil
=
countdown
.
children
var
b
=
this
.
time
-
5
var
b
=
this
.
time
-
3
chil
[
0
].
active
=
true
chil
[
0
].
active
=
true
chil
[
1
].
active
=
false
chil
[
1
].
active
=
false
var
timer
=
setInterval
(()
=>
{
var
timer
=
setInterval
(()
=>
{
...
@@ -203,11 +202,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -203,11 +202,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
//每隔五秒
//每隔五秒
if
(
Number
(
this
.
countdownTime
)
-
b
<=
0
)
{
if
(
Number
(
this
.
countdownTime
)
-
b
<=
0
)
{
console
.
log
(
Number
(
this
.
countdownTime
)
-
b
)
/* console.log(Number(this.countdownTime) - b) */
//等待用户回答问题
//等待用户回答问题
this
.
whetherQuestions
(
topQuestion
)
this
.
whetherQuestions
(
topQuestion
)
b
-=
5
b
-=
3
//下一题
//下一题
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
titleOptions
(
topQuestion
)
this
.
titleOptions
(
topQuestion
)
...
@@ -228,6 +227,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -228,6 +227,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
var
options
=
this
.
data
.
options
var
options
=
this
.
data
.
options
pg
.
view
.
setNetImg
(
topQuestion
.
children
[
1
],
options
[
this
.
currentId
].
image
,
{
w
:
700
,
h
:
360
})
pg
.
view
.
setNetImg
(
topQuestion
.
children
[
1
],
options
[
this
.
currentId
].
image
,
{
w
:
700
,
h
:
360
})
pg
.
view
.
setString
(
topQuestion
.
children
[
2
],
options
[
this
.
currentId
].
text
)
pg
.
view
.
setString
(
topQuestion
.
children
[
2
],
options
[
this
.
currentId
].
text
)
console
.
log
(
'
next
'
)
}
}
//题目数分配
//题目数分配
questionNuber
()
{
questionNuber
()
{
...
@@ -259,7 +259,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -259,7 +259,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
//用户回答问题
//用户回答问题
whetherQuestions
(
topQuestion
)
{
whetherQuestions
(
topQuestion
)
{
var
answer
=
this
.
currentId
>
0
var
answer
=
this
.
currentId
>
=
0
this
.
whetherAnswer
(
topQuestion
,
answer
)
this
.
whetherAnswer
(
topQuestion
,
answer
)
}
}
//用户回答结果
//用户回答结果
...
@@ -312,7 +312,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -312,7 +312,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
row
.
children
[
0
].
active
=
true
row
.
children
[
0
].
active
=
true
}
}
addAnimation
(
row
,
topQuestion
)
{
addAnimation
(
row
,
topQuestion
)
{
if
(
this
.
currentId
<
(
this
.
time
/
5
)
-
1
)
{
if
(
this
.
currentId
<
(
this
.
time
/
3
)
-
1
)
{
//初始化
//初始化
setTimeout
(()
=>
{
setTimeout
(()
=>
{
row
.
children
[
0
].
active
=
false
row
.
children
[
0
].
active
=
false
...
...
assets/hy06_danxuan/script/defaultData_hy06_danxuan.ts
View file @
d2b6c858
export
const
defaultData
=
export
const
defaultData
=
{
"
onlineFlg
"
:
false
,
"
title
"
:
"
钓鱼大作战
"
,
"
questionText
"
:
"
海洋里有很多鱼,每条鱼身上都藏着魔法信息!亲爱的小玩家,请仔细听游戏指令,找到含有正确魔法信息的鱼,快速完成钓鱼。 在本次的游戏中,你将和其他玩家进行PK,游戏结束,钓鱼数量最多的玩家,将获得胜利。最后根据钓鱼的数量,你将获得相应的能量石奖励!开始挑战吧!
"
,
"
questionTextAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/e422c682ff3304a532937db64573caa4.mp3
"
,
"
questions
"
:
[{
"
questionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/6d742645880f902efae878facc78da07_l.mp3
"
,
"
duration
"
:
120
,
"
options
"
:
[{
"
type
"
:
"
img
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/5e0afcb2626cb97395fa80688d0da26e.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/a5fb06cfafd5c74d143d00b8cafbed2e_l.mp3
"
,
"
text
"
:
"
push
"
,
"
right
"
:
false
,
"
audioName
"
:
"
正确.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/d1905036a1cbe59e269641576bf025cb.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/141bd6c7ce281deb3c2a6ceb66e2148e_l.mp3
"
,
"
text
"
:
"
yun
"
,
"
right
"
:
false
,
"
audioName
"
:
"
错误.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/65732948abd635b143bcca6bf30e1ae3.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/5eeac1448c75db6dda78519ae7986dd2_l.mp3
"
,
"
text
"
:
"
right
"
,
"
right
"
:
false
,
"
audioName
"
:
"
星星变虎头.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/017549d06d93f449af1ca4e1306cc970.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/6d742645880f902efae878facc78da07_l.mp3
"
,
"
text
"
:
"
star
"
,
"
right
"
:
false
,
"
audioName
"
:
"
请在5秒内说出正确答案.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/5e0afcb2626cb97395fa80688d0da26e.png
"
,
"
audio
"
:
""
,
"
text
"
:
"
123
"
,
"
right
"
:
false
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/e6ea7e0efa41ddfbcbbd6e01581a1d2f.png
"
,
"
audio
"
:
""
,
"
text
"
:
"
123
"
,
"
right
"
:
false
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/e6ea7e0efa41ddfbcbbd6e01581a1d2f.png
"
,
"
audio
"
:
""
,
"
text
"
:
"
123
"
,
"
right
"
:
false
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/5e0afcb2626cb97395fa80688d0da26e.png
"
,
"
audio
"
:
""
,
"
text
"
:
"
123
"
,
"
right
"
:
false
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/e6ea7e0efa41ddfbcbbd6e01581a1d2f.png
"
,
"
audio
"
:
""
,
"
text
"
:
"
123
"
,
"
right
"
:
false
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/5e0afcb2626cb97395fa80688d0da26e.png
"
,
"
audio
"
:
""
,
"
text
"
:
"
123
"
,
"
right
"
:
false
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/65732948abd635b143bcca6bf30e1ae3.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/5eeac1448c75db6dda78519ae7986dd2_l.mp3
"
,
"
text
"
:
"
right
"
,
"
right
"
:
false
,
"
audioName
"
:
"
星星变虎头.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/d1905036a1cbe59e269641576bf025cb.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/141bd6c7ce281deb3c2a6ceb66e2148e_l.mp3
"
,
"
text
"
:
"
yun
"
,
"
right
"
:
false
,
"
audioName
"
:
"
错误.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/65732948abd635b143bcca6bf30e1ae3.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/5eeac1448c75db6dda78519ae7986dd2_l.mp3
"
,
"
text
"
:
"
right
"
,
"
right
"
:
false
,
"
audioName
"
:
"
星星变虎头.mp3
"
}],
"
audioName
"
:
"
请在5秒内说出正确答案.mp3
"
}],
"
bgAudio
"
:
""
,
"
bgAudioName
"
:
""
,
"
audioName
"
:
""
}
{
"
onlineFlg
"
:
false
,
"
title
"
:
"
钓鱼大作战
"
,
"
questionText
"
:
"
海洋里有很多鱼,每条鱼身上都藏着魔法信息!亲爱的小玩家,请仔细听游戏指令,找到含有正确魔法信息的鱼,快速完成钓鱼。 在本次的游戏中,你将和其他玩家进行PK,游戏结束,钓鱼数量最多的玩家,将获得胜利。最后根据钓鱼的数量,你将获得相应的能量石奖励!开始挑战吧!
"
,
"
questionTextAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/e422c682ff3304a532937db64573caa4.mp3
"
,
"
questions
"
:
[{
"
questionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/cb76dbc838567b58e2af36e2d2faa923_l.mp3
"
,
"
duration
"
:
120
,
"
options
"
:
[{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/3a7fdd71c900985e8f493d8e4035bf84.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/c9db9c8f9c256b928a7f0e1498963404_l.mp3
"
,
"
text
"
:
"
111
"
,
"
right
"
:
false
,
"
audioName
"
:
"
ready go.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/017549d06d93f449af1ca4e1306cc970.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/c9db9c8f9c256b928a7f0e1498963404_l.mp3
"
,
"
text
"
:
"
222
"
,
"
right
"
:
false
,
"
audioName
"
:
"
ready go.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/65732948abd635b143bcca6bf30e1ae3.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/5eeac1448c75db6dda78519ae7986dd2_l.mp3
"
,
"
text
"
:
"
333
"
,
"
right
"
:
false
,
"
audioName
"
:
"
星星变虎头.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/c08d44585d0846bfe0fd8e923425d6a2.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/5eeac1448c75db6dda78519ae7986dd2_l.mp3
"
,
"
text
"
:
"
444
"
,
"
right
"
:
false
,
"
audioName
"
:
"
星星变虎头.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/e6ea7e0efa41ddfbcbbd6e01581a1d2f.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/cb76dbc838567b58e2af36e2d2faa923_l.mp3
"
,
"
text
"
:
"
555
"
,
"
right
"
:
false
,
"
audioName
"
:
"
图片卡片出现.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/3a7fdd71c900985e8f493d8e4035bf84.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/c9db9c8f9c256b928a7f0e1498963404_l.mp3
"
,
"
text
"
:
"
111
"
,
"
right
"
:
false
,
"
audioName
"
:
"
ready go.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/017549d06d93f449af1ca4e1306cc970.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/c9db9c8f9c256b928a7f0e1498963404_l.mp3
"
,
"
text
"
:
"
222
"
,
"
right
"
:
false
,
"
audioName
"
:
"
ready go.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/65732948abd635b143bcca6bf30e1ae3.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/5eeac1448c75db6dda78519ae7986dd2_l.mp3
"
,
"
text
"
:
"
333
"
,
"
right
"
:
false
,
"
audioName
"
:
"
星星变虎头.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/c08d44585d0846bfe0fd8e923425d6a2.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/5eeac1448c75db6dda78519ae7986dd2_l.mp3
"
,
"
text
"
:
"
444
"
,
"
right
"
:
false
,
"
audioName
"
:
"
星星变虎头.mp3
"
},
{
"
type
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/e6ea7e0efa41ddfbcbbd6e01581a1d2f.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/cb76dbc838567b58e2af36e2d2faa923_l.mp3
"
,
"
text
"
:
"
555
"
,
"
right
"
:
false
,
"
audioName
"
:
"
图片卡片出现.mp3
"
}],
"
audioName
"
:
"
图片卡片出现.mp3
"
}],
"
bgAudio
"
:
""
,
"
bgAudioName
"
:
""
,
"
audioName
"
:
""
}
// {
// {
// "recordFlag": true,
// "recordFlag": true,
...
...
form/src/app/form/form.component.html
View file @
d2b6c858
...
@@ -204,7 +204,7 @@
...
@@ -204,7 +204,7 @@
</div>
</div>
</div>
</div>
<div
class=
"option-text"
>
<div
class=
"option-text"
>
<div
style=
"width: 200px"
>
<div
style=
"width: 200px"
>
<span
style=
"font-size: 20px;"
>
文本
</span>
<span
style=
"font-size: 20px;"
>
文本
</span>
<input
type=
"text"
nz-input
[(
ngModel
)]="
option
.
text
"
(
blur
)="
save
()"
>
<input
type=
"text"
nz-input
[(
ngModel
)]="
option
.
text
"
(
blur
)="
save
()"
>
</div>
</div>
...
@@ -249,8 +249,8 @@
...
@@ -249,8 +249,8 @@
</div>
</div>
<!-- <button class="btn-blue" style="margin-top:10px;width: 1000px; height: 50px;" nz-button nzType="default" nzDanger
<!-- <button class="btn-blue" style="margin-top:10px;width: 1000px; height: 50px;"
(click)="addquestion()">+增加题目</button> -->
nz-button nzType="default" nzDanger
(click)="addquestion()">+增加题目</button> -->
</div>
</div>
...
...
form/src/app/form/form.component.ts
View file @
d2b6c858
...
@@ -16,7 +16,11 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -16,7 +16,11 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
title
:
"
钓鱼大作战
"
,
title
:
"
钓鱼大作战
"
,
questionText
:
"
海洋里有很多鱼,每条鱼身上都藏着魔法信息!亲爱的小玩家,请仔细听游戏指令,找到含有正确魔法信息的鱼,快速完成钓鱼。 在本次的游戏中,你将和其他玩家进行PK,游戏结束,钓鱼数量最多的玩家,将获得胜利。最后根据钓鱼的数量,你将获得相应的能量石奖励!开始挑战吧!
"
,
questionText
:
"
海洋里有很多鱼,每条鱼身上都藏着魔法信息!亲爱的小玩家,请仔细听游戏指令,找到含有正确魔法信息的鱼,快速完成钓鱼。 在本次的游戏中,你将和其他玩家进行PK,游戏结束,钓鱼数量最多的玩家,将获得胜利。最后根据钓鱼的数量,你将获得相应的能量石奖励!开始挑战吧!
"
,
questionTextAudio
:
"
http://staging-teach.cdn.ireadabc.com/e422c682ff3304a532937db64573caa4.mp3
"
,
questionTextAudio
:
"
http://staging-teach.cdn.ireadabc.com/e422c682ff3304a532937db64573caa4.mp3
"
,
questions
:
[],
questions
:
[{
questionAudio
:
""
,
duration
:
120
,
options
:
[]
}],
bgAudio
:
""
,
bgAudio
:
""
,
bgAudioName
:
""
,
bgAudioName
:
""
,
audioName
:
""
audioName
:
""
...
...
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