Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
op72_plus
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
op72_plus
Commits
5645ceee
Commit
5645ceee
authored
Nov 25, 2022
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11.25调整
parent
e7bba903
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
606 additions
and
411 deletions
+606
-411
ding.mp3
assets/op72_plus/audios/ding.mp3
+0
-0
ding.mp3.meta
assets/op72_plus/audios/ding.mp3.meta
+7
-0
huri.mp3
assets/op72_plus/audios/huri.mp3
+0
-0
huri.mp3.meta
assets/op72_plus/audios/huri.mp3.meta
+7
-0
op72_plus.fire
assets/op72_plus/scene/op72_plus.fire
+564
-396
op72_plus.ts
assets/op72_plus/scene/op72_plus.ts
+10
-8
Game.ts
assets/op72_plus/scene/tool/Game.ts
+5
-0
defaultData.ts
assets/op72_plus/script/defaultData.ts
+1
-0
form.component.html
form/src/app/form/form.component.html
+11
-7
form.component.ts
form/src/app/form/form.component.ts
+1
-0
No files found.
assets/op72_plus/audios/ding.mp3
0 → 100644
View file @
5645ceee
File added
assets/op72_plus/audios/ding.mp3.meta
0 → 100644
View file @
5645ceee
{
"ver": "2.0.1",
"uuid": "924c41cb-644a-46f6-8920-301331b63dc8",
"downloadMode": 0,
"duration": 0.835918,
"subMetas": {}
}
\ No newline at end of file
assets/op72_plus/audios/huri.mp3
0 → 100644
View file @
5645ceee
File added
assets/op72_plus/audios/huri.mp3.meta
0 → 100644
View file @
5645ceee
{
"ver": "2.0.1",
"uuid": "f66cd5ce-3586-461c-a819-f610db2b7c23",
"downloadMode": 0,
"duration": 0.2642,
"subMetas": {}
}
\ No newline at end of file
assets/op72_plus/scene/op72_plus.fire
View file @
5645ceee
This diff is collapsed.
Click to expand it.
assets/op72_plus/scene/op72_plus.ts
View file @
5645ceee
...
@@ -104,7 +104,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -104,7 +104,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg
.
event
.
clear
();
pg
.
event
.
clear
();
}
}
initData
()
{
private
initData
()
{
Game
.
getIns
().
init
(
this
.
data
);
Game
.
getIns
().
init
(
this
.
data
);
Game
.
getIns
().
reset
();
Game
.
getIns
().
reset
();
// 所有全局变量 默认都是null
// 所有全局变量 默认都是null
...
@@ -116,10 +116,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -116,10 +116,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
gameStart
();
this
.
gameStart
();
})
})
}
}
initEvent
()
{
private
initEvent
()
{
cc
.
find
(
"
btnCheckCat
"
,
this
.
dbCat
).
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onCat
,
this
);
}
private
onCat
()
{
this
.
catPlayAni
(
Game
.
getIns
().
waitAudio
,
()
=>
{
})
}
}
private
gameOver
()
{
private
gameOver
()
{
Game
.
getIns
().
state
=
GAME_STATE
.
OVER
;
Game
.
getIns
().
state
=
GAME_STATE
.
OVER
;
// let data: any = {};
// let data: any = {};
...
@@ -132,6 +135,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -132,6 +135,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// let leaf_ske = cc.find("leaf_ske", this.node);
// let leaf_ske = cc.find("leaf_ske", this.node);
// leaf_ske.active = true;
// leaf_ske.active = true;
// playDragonBoneAnimation(leaf_ske, "normal", 1);
// playDragonBoneAnimation(leaf_ske, "normal", 1);
cc
.
audioEngine
.
stopAllEffects
();
this
.
catPlayAni
(
Game
.
getIns
().
endAudio
,
()
=>
{
this
.
catPlayAni
(
Game
.
getIns
().
endAudio
,
()
=>
{
this
.
dbCat
.
active
=
false
;
this
.
dbCat
.
active
=
false
;
this
.
stopCountTime
();
this
.
stopCountTime
();
...
@@ -144,7 +148,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -144,7 +148,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
Game
.
getIns
().
state
=
GAME_STATE
.
RUNNING
;
Game
.
getIns
().
state
=
GAME_STATE
.
RUNNING
;
this
.
dbCat
.
active
=
true
;
this
.
dbCat
.
active
=
true
;
this
.
showQuestion
();
this
.
showQuestion
();
pg
.
audio
.
playAudioByUrl
(
Game
.
getIns
().
getCurrentPage
().
audioUrl
);
this
.
playLocalAudio
(
"
ding
"
);
}
}
// private questions;
// private questions;
// private cardInfo;
// private cardInfo;
...
@@ -299,7 +303,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -299,7 +303,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
onHomeworkFinish
({});
onHomeworkFinish
({});
}
else
{
}
else
{
console
.
log
(
"
over
"
);
console
.
log
(
"
over
"
);
pg
.
audio
.
playAudioByUrl
(
Game
.
getIns
().
getCurrentPage
().
endAudio
).
then
(()
=>
{
this
.
playLocalAudio
(
"
huri
"
).
then
(()
=>
{
this
.
layout_word
.
children
.
forEach
((
ch
)
=>
{
this
.
layout_word
.
children
.
forEach
((
ch
)
=>
{
ch
.
getComponent
(
cc
.
Label
).
string
=
""
;
ch
.
getComponent
(
cc
.
Label
).
string
=
""
;
})
})
...
@@ -307,8 +311,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -307,8 +311,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
});
return
;
return
;
}
}
}
}
//根据两点获取距离
//根据两点获取距离
...
...
assets/op72_plus/scene/tool/Game.ts
View file @
5645ceee
...
@@ -151,6 +151,7 @@ export default class Game {
...
@@ -151,6 +151,7 @@ export default class Game {
public
beginAudio
:
string
;
public
beginAudio
:
string
;
public
endAudio
:
string
;
public
endAudio
:
string
;
public
loadingAudio
:
string
;
public
loadingAudio
:
string
;
public
waitAudio
:
string
;
public
finishAudioList
;
public
finishAudioList
;
public
init
(
data
)
{
public
init
(
data
)
{
this
.
title
=
data
.
title
;
this
.
title
=
data
.
title
;
...
@@ -158,6 +159,7 @@ export default class Game {
...
@@ -158,6 +159,7 @@ export default class Game {
this
.
beginAudio
=
data
.
guideBegin_audio_url
||
""
;
this
.
beginAudio
=
data
.
guideBegin_audio_url
||
""
;
this
.
endAudio
=
data
.
endAudio
||
""
;
this
.
endAudio
=
data
.
endAudio
||
""
;
this
.
loadingAudio
=
data
.
startLoadingAudio
||
""
;
this
.
loadingAudio
=
data
.
startLoadingAudio
||
""
;
this
.
waitAudio
=
data
.
waitAudio
||
""
;
this
.
finishAudioList
=
data
.
finishAudioList
||
[];
this
.
finishAudioList
=
data
.
finishAudioList
||
[];
this
.
lists
=
[];
this
.
lists
=
[];
this
.
data
=
data
.
questions
;
this
.
data
=
data
.
questions
;
...
@@ -174,6 +176,9 @@ export default class Game {
...
@@ -174,6 +176,9 @@ export default class Game {
let
data
=
this
.
data
[
i
];
let
data
=
this
.
data
[
i
];
this
.
lists
.
push
(
new
Option
(
data
,
i
+
1
));
this
.
lists
.
push
(
new
Option
(
data
,
i
+
1
));
}
}
this
.
lists
.
sort
(
function
()
{
return
(
0.5
-
Math
.
random
());
});
this
.
state
=
GAME_STATE
.
WAIT
;
this
.
state
=
GAME_STATE
.
WAIT
;
this
.
total
=
this
.
lists
.
length
;
this
.
total
=
this
.
lists
.
length
;
}
}
...
...
assets/op72_plus/script/defaultData.ts
View file @
5645ceee
...
@@ -22,6 +22,7 @@ export const defaultData = {
...
@@ -22,6 +22,7 @@ export const defaultData = {
],
],
"
beginAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8_l.mp3
"
,
"
beginAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8_l.mp3
"
,
"
endAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/fd8a2b8eeb4abbe7683d30e728ece184.mp3
"
,
"
endAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/fd8a2b8eeb4abbe7683d30e728ece184.mp3
"
,
"
waitAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/fd8a2b8eeb4abbe7683d30e728ece184.mp3
"
,
"
startLoadingAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/cdc41b6682e155c385093c52d2a4adff.mp3
"
,
"
startLoadingAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/cdc41b6682e155c385093c52d2a4adff.mp3
"
,
"
guideRestart_audio_url
"
:
""
,
"
guideRestart_audio_url
"
:
""
,
"
finishAudioList
"
:
[
"
finishAudioList
"
:
[
...
...
form/src/app/form/form.component.html
View file @
5645ceee
...
@@ -84,6 +84,10 @@
...
@@ -84,6 +84,10 @@
<app-audio-recorder
style=
"margin-left: 10px; "
[
audioUrl
]="
item
.
endAudio
"
<app-audio-recorder
style=
"margin-left: 10px; "
[
audioUrl
]="
item
.
endAudio
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
endAudio
',
item
,'
endAudioName
')"
></app-audio-recorder>
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
endAudio
',
item
,'
endAudioName
')"
></app-audio-recorder>
<span
style=
"font-size: 20px;"
>
猫咪待机音频:
</span>
<app-audio-recorder
style=
"margin-left: 10px; "
[
audioUrl
]="
item
.
waitAudio
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
waitAudio
',
item
,'
waitAudioName
')"
></app-audio-recorder>
<span
style=
"font-size: 20px;"
>
开始读条音频:
</span>
<span
style=
"font-size: 20px;"
>
开始读条音频:
</span>
<app-audio-recorder
style=
"margin-left: 10px; "
[
audioUrl
]="
item
.
startLoadingAudio
"
<app-audio-recorder
style=
"margin-left: 10px; "
[
audioUrl
]="
item
.
startLoadingAudio
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
startLoadingAudio
',
item
,'
loadAudioName
')"
></app-audio-recorder>
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
startLoadingAudio
',
item
,'
loadAudioName
')"
></app-audio-recorder>
...
@@ -139,7 +143,7 @@
...
@@ -139,7 +143,7 @@
</div>
</div>
</div> -->
</div> -->
<div
class=
"option-audio"
>
<
!-- <
div class="option-audio">
<div class="word-input-title">
<div class="word-input-title">
题目音频:
题目音频:
</div>
</div>
...
@@ -151,12 +155,12 @@
...
@@ -151,12 +155,12 @@
</div>
</div>
<div style="margin: 5px">
<div style="margin: 5px">
<span>
<span>
<!-- {{ question.audioName}} -->
{{ question.audioName}}
</span>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
-->
<div
class=
"option-audio"
>
<
!-- <
div class="option-audio">
<div class="word-input-title">
<div class="word-input-title">
结束音频:
结束音频:
</div>
</div>
...
@@ -168,13 +172,13 @@
...
@@ -168,13 +172,13 @@
</div>
</div>
<div style="margin: 5px">
<div style="margin: 5px">
<span>
<span>
<!-- {{ question.audioEndName}} -->
{{ question.audioEndName}}
</span>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
-->
<div
>
<div>
<span
style=
"font-size: 20px;"
>
标题图片:
</span>
<span
style=
"font-size: 20px;"
>
标题图片:
</span>
<div
style=
"width:300px"
>
<div
style=
"width:300px"
>
<app-upload-image-with-preview
[
picUrl
]="
question
.
image
"
<app-upload-image-with-preview
[
picUrl
]="
question
.
image
"
...
...
form/src/app/form/form.component.ts
View file @
5645ceee
...
@@ -22,6 +22,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -22,6 +22,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
finishAudioList
:
[],
finishAudioList
:
[],
beginAudio
:
""
,
beginAudio
:
""
,
endAudio
:
""
,
endAudio
:
""
,
waitAudio
:
""
,
startLoadingAudio
:
""
,
startLoadingAudio
:
""
,
};
};
...
...
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