Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
L5R3_GuessingGame
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
L5R3_GuessingGame
Commits
b18347c6
Commit
b18347c6
authored
Nov 28, 2022
by
杨一航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
1ac5fb5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
2 deletions
+63
-2
L5R3_GuessingGame.ts
assets/L5R3_GuessingGame/scene/L5R3_GuessingGame.ts
+63
-2
No files found.
assets/L5R3_GuessingGame/scene/L5R3_GuessingGame.ts
View file @
b18347c6
...
@@ -63,6 +63,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -63,6 +63,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
_catSpeaking
:
boolean
;
private
_catSpeaking
:
boolean
;
private
_audioNode
:
cc
.
Node
;
private
_audioNode
:
cc
.
Node
;
private
_canChosendCard
:
boolean
=
true
;
private
_canChosendCard
:
boolean
=
true
;
_wordData
:
{
monkey
:
string
[];
tiger
:
string
[];
pencil
:
string
[];
music
:
string
[];
honey
:
string
[];
baby
:
string
[];
};
private
_otherWord
:
any
;
onLoad
()
{
onLoad
()
{
...
@@ -837,6 +839,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -837,6 +839,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
schedule
(
this
.
longTimeNoAction
,
15
,
6
,
15
)
this
.
schedule
(
this
.
longTimeNoAction
,
15
,
6
,
15
)
this
.
cover
.
active
=
true
;
this
.
cover
.
active
=
true
;
this
.
recordCat
.
active
=
false
;
// this.cat.active = false;
// this.cat.active = false;
this
.
_clockNode
.
active
=
false
;
this
.
_clockNode
.
active
=
false
;
let
probar
=
this
.
cover
.
getChildByName
(
"
bg
"
).
getChildByName
(
"
probar
"
);
let
probar
=
this
.
cover
.
getChildByName
(
"
bg
"
).
getChildByName
(
"
probar
"
);
...
@@ -861,7 +864,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -861,7 +864,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// });
// });
// })
// })
// } else {
// } else {
this
.
recordCat
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
record
"
,
0
);
//
this.recordCat.getComponent(dragonBones.ArmatureDisplay).playAnimation("record", 0);
// }
// }
this
.
_startCourseware
();
this
.
_startCourseware
();
...
@@ -901,6 +904,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -901,6 +904,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
this
.
log
(
"
++++++++++++ _coursewareEnd +++++++++++++++
"
);
this
.
log
(
"
++++++++++++ _coursewareEnd +++++++++++++++
"
);
this
.
log
(
"
发音===
"
+
res
.
text
);
this
.
log
(
"
发音===
"
+
res
.
text
);
this
.
_coursewareEnd
(
res
.
text
)
this
.
_coursewareEnd
(
res
.
text
)
});
});
}
else
{
}
else
{
...
@@ -913,9 +918,65 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -913,9 +918,65 @@ export default class SceneComponent extends MyCocosSceneComponent {
async
_coursewareEnd
(
text
:
string
)
{
async
_coursewareEnd
(
text
:
string
)
{
this
.
cover
.
active
=
false
;
this
.
cover
.
active
=
false
;
this
.
log
(
text
)
let
strs
:
Array
<
string
>
=
this
.
_wordData
[
this
.
_otherWord
];
if
(
strs
.
indexOf
(
text
))
{
this
.
pp
.
getChildByName
(
"
lb
"
).
getComponent
(
cc
.
Label
).
string
=
"
Yes
"
;
}
else
{
this
.
pp
.
getChildByName
(
"
lb
"
).
getComponent
(
cc
.
Label
).
string
=
"
No
"
;
}
let
tips
=
`点击气泡框按照下列方式问:
Is your word (正确单词)
Can you eat it?
It is (颜色)?
It is a/an animal/fruit?`
;
asyncDelay
(
2
).
then
(()
=>
{
this
.
pp
.
getChildByName
(
"
lb
"
).
getComponent
(
cc
.
Label
).
string
=
tips
;
})
}
}
initwordAnswerData
()
{
this
.
_wordData
=
{
monkey
:
[
"
Is your word monkey
"
,
"
Is it brown
"
,
"
Is it an animal
"
,
],
tiger
:
[
"
Is your word tiger
"
,
"
Is it orange
"
,
"
Is it black and orange
"
,
"
Is it orange and black
"
,
"
Is it an animal
"
,
],
pencil
:
[
"
Is your word pencil
"
,
"
Is it yellow
"
,
"
Is it an animal
"
,
],
music
:
[
"
Is your word music
"
,
"
Is it black
"
,
],
honey
:
[
"
Is your word honey
"
,
"
Is it orange
"
,
"
Is it yellow
"
,
"
Is it brown
"
,
"
Is it a fruit
"
,
"
Can you eat it
"
,
],
baby
:
[
"
Is your word baby
"
,
"
Is it bule
"
,
"
Is it green
"
,
],
}
}
finish
()
{
finish
()
{
// onHomeworkFinish();
// onHomeworkFinish();
...
...
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