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
f184512c
Commit
f184512c
authored
Nov 29, 2022
by
杨一航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
5977ba48
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
892 additions
and
720 deletions
+892
-720
EndView.ts
assets/L5R3_GuessingGame/prefabs/endView/EndView.ts
+9
-4
endView.prefab
assets/L5R3_GuessingGame/prefabs/endView/endView.prefab
+67
-67
keyboard.prefab
assets/L5R3_GuessingGame/prefabs/keyboards/keyboard.prefab
+496
-436
L5R3_GuessingGame.fire
assets/L5R3_GuessingGame/scene/L5R3_GuessingGame.fire
+313
-212
L5R3_GuessingGame.ts
assets/L5R3_GuessingGame/scene/L5R3_GuessingGame.ts
+7
-1
No files found.
assets/L5R3_GuessingGame/prefabs/endView/EndView.ts
View file @
f184512c
...
@@ -73,15 +73,20 @@ export default class EndView extends cc.Component {
...
@@ -73,15 +73,20 @@ export default class EndView extends cc.Component {
})
})
if
(
win
)
{
if
(
win
)
{
await
asyncDelay
(
0.5
)
this
.
winRoot
.
getChildByName
(
"
audio
"
).
active
=
true
;
await
asyncDelay
(
0.5
)
this
.
winRoot
.
getChildByName
(
"
ani
"
).
active
=
true
;
this
.
winRoot
.
getChildByName
(
"
ani
"
).
active
=
true
;
await
asyncDelay
(
1
)
await
asyncDelay
(
1
)
this
.
winRoot
.
getChildByName
(
"
a
udio
"
).
active
=
true
;
this
.
winRoot
.
getChildByName
(
"
a
ni
"
).
active
=
false
;
;
}
else
{
}
else
{
this
.
loseRoot
.
getChildByName
(
"
ani
"
).
active
=
true
;
await
asyncDelay
(
1
)
await
asyncDelay
(
0.5
)
this
.
loseRoot
.
getChildByName
(
"
audio
"
).
active
=
true
;
this
.
loseRoot
.
getChildByName
(
"
audio
"
).
active
=
true
;
await
asyncDelay
(
0.5
)
this
.
loseRoot
.
getChildByName
(
"
ani
"
).
active
=
true
;
}
}
}
}
replay
()
{
replay
()
{
...
...
assets/L5R3_GuessingGame/prefabs/endView/endView.prefab
View file @
f184512c
...
@@ -609,13 +609,13 @@
...
@@ -609,13 +609,13 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
top
",
"_name": "
ani
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 11
"__id__": 11
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 16
"__id__": 16
...
@@ -634,8 +634,8 @@
...
@@ -634,8 +634,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 1
589
,
"width": 1
241
,
"height":
590
"height":
656
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -646,8 +646,8 @@
...
@@ -646,8 +646,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
2.65
,
0
,
2
33.201
,
2
69.974
,
0,
0,
0,
0,
0,
0,
...
@@ -672,7 +672,7 @@
...
@@ -672,7 +672,7 @@
"_id": ""
"_id": ""
},
},
{
{
"__type__": "
cc.Sprite
",
"__type__": "
dragonBones.ArmatureDisplay
",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
...
@@ -684,23 +684,31 @@
...
@@ -684,23 +684,31 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
}
],
],
"_srcBlendFactor": 770,
"_armatureName": "Armature",
"_dstBlendFactor": 771,
"_animationName": "normal",
"_spriteFrame": {
"_preCacheMode": 0,
"__uuid__": "4af41b0b-f45d-4508-b32c-6d7863e4687b"
"_cacheMode": 0,
"playTimes": 1,
"premultipliedAlpha": false,
"_armatureKey": "db49f873-02c4-4779-aba9-2c6b45bf28e0#7c47a36a-14d8-4e9e-bd26-8641b2ceb0c6",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "db49f873-02c4-4779-aba9-2c6b45bf28e0"
},
},
"_type": 0,
"_N$dragonAtlasAsset": {
"_sizeMode": 1,
"__uuid__": "7c47a36a-14d8-4e9e-bd26-8641b2ceb0c6"
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
},
"_fillStart": 0,
"_N$_defaultArmatureIndex": 0,
"_fillRange": 0,
"_N$_animationIndex": 1,
"_isTrimmedMode": true,
"_N$_defaultCacheMode": 0,
"_atlas": null,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": ""
"_id": ""
},
},
{
{
...
@@ -711,12 +719,12 @@
...
@@ -711,12 +719,12 @@
"asset": {
"asset": {
"__uuid__": "84b72720-2013-4f2b-b787-52900432f34f"
"__uuid__": "84b72720-2013-4f2b-b787-52900432f34f"
},
},
"fileId": "
aex+eqEi1MerCIM+owZfyg
",
"fileId": "
6fCcFF9HxM+5x95Uv5cY4G
",
"sync": false
"sync": false
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
reward
",
"_name": "
top
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 11
"__id__": 11
...
@@ -741,8 +749,8 @@
...
@@ -741,8 +749,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
416
,
"width":
1589
,
"height":
376
"height":
590
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -753,8 +761,8 @@
...
@@ -753,8 +761,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
8.259
,
2.65
,
2
8.907
,
2
33.201
,
0,
0,
0,
0,
0,
0,
...
@@ -794,7 +802,7 @@
...
@@ -794,7 +802,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
1f2b6e51-3f77-427c-b96e-f3263966de16
"
"__uuid__": "
4af41b0b-f45d-4508-b32c-6d7863e4687b
"
},
},
"_type": 0,
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 1,
...
@@ -818,12 +826,12 @@
...
@@ -818,12 +826,12 @@
"asset": {
"asset": {
"__uuid__": "84b72720-2013-4f2b-b787-52900432f34f"
"__uuid__": "84b72720-2013-4f2b-b787-52900432f34f"
},
},
"fileId": "
532I/hCrFCl7KjGtK+SUXk
",
"fileId": "
aex+eqEi1MerCIM+owZfyg
",
"sync": false
"sync": false
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
WIN_
",
"_name": "
reward
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 11
"__id__": 11
...
@@ -848,8 +856,8 @@
...
@@ -848,8 +856,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
1000
,
"width":
416
,
"height":
262
"height":
376
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -861,7 +869,7 @@
...
@@ -861,7 +869,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
8.259,
8.259,
379.923
,
28.907
,
0,
0,
0,
0,
0,
0,
...
@@ -901,7 +909,7 @@
...
@@ -901,7 +909,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
9b6fd39a-dc70-4101-9f7c-1233c26aa401
"
"__uuid__": "
1f2b6e51-3f77-427c-b96e-f3263966de16
"
},
},
"_type": 0,
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 1,
...
@@ -925,18 +933,18 @@
...
@@ -925,18 +933,18 @@
"asset": {
"asset": {
"__uuid__": "84b72720-2013-4f2b-b787-52900432f34f"
"__uuid__": "84b72720-2013-4f2b-b787-52900432f34f"
},
},
"fileId": "
f69yFoeWpCcYXzHA2tLyDK
",
"fileId": "
532I/hCrFCl7KjGtK+SUXk
",
"sync": false
"sync": false
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
ani
",
"_name": "
WIN_
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 11
"__id__": 11
},
},
"_children": [],
"_children": [],
"_active":
fals
e,
"_active":
tru
e,
"_components": [
"_components": [
{
{
"__id__": 25
"__id__": 25
...
@@ -955,8 +963,8 @@
...
@@ -955,8 +963,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 1
241
,
"width": 1
000
,
"height":
656
"height":
262
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -967,8 +975,8 @@
...
@@ -967,8 +975,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0
,
8.259
,
269.974
,
379.923
,
0,
0,
0,
0,
0,
0,
...
@@ -993,7 +1001,7 @@
...
@@ -993,7 +1001,7 @@
"_id": ""
"_id": ""
},
},
{
{
"__type__": "
dragonBones.ArmatureDisplay
",
"__type__": "
cc.Sprite
",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
...
@@ -1005,31 +1013,23 @@
...
@@ -1005,31 +1013,23 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
}
],
],
"_armatureName": "Armature",
"_srcBlendFactor": 770,
"_animationName": "normal",
"_dstBlendFactor": 771,
"_preCacheMode": 0,
"_spriteFrame": {
"_cacheMode": 0,
"__uuid__": "9b6fd39a-dc70-4101-9f7c-1233c26aa401"
"playTimes": 0,
"premultipliedAlpha": false,
"_armatureKey": "db49f873-02c4-4779-aba9-2c6b45bf28e0#7c47a36a-14d8-4e9e-bd26-8641b2ceb0c6",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "db49f873-02c4-4779-aba9-2c6b45bf28e0"
},
},
"_N$dragonAtlasAsset": {
"_type": 0,
"__uuid__": "7c47a36a-14d8-4e9e-bd26-8641b2ceb0c6"
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
},
"_N$_defaultArmatureIndex": 0,
"_fillStart": 0,
"_N$_animationIndex": 1,
"_fillRange": 0,
"_N$_defaultCacheMode": 0,
"_isTrimmedMode": true,
"_N$timeScale": 1,
"_atlas": null,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": ""
"_id": ""
},
},
{
{
...
@@ -1040,7 +1040,7 @@
...
@@ -1040,7 +1040,7 @@
"asset": {
"asset": {
"__uuid__": "84b72720-2013-4f2b-b787-52900432f34f"
"__uuid__": "84b72720-2013-4f2b-b787-52900432f34f"
},
},
"fileId": "
6fCcFF9HxM+5x95Uv5cY4G
",
"fileId": "
f69yFoeWpCcYXzHA2tLyDK
",
"sync": false
"sync": false
},
},
{
{
...
...
assets/L5R3_GuessingGame/prefabs/keyboards/keyboard.prefab
View file @
f184512c
This diff is collapsed.
Click to expand it.
assets/L5R3_GuessingGame/scene/L5R3_GuessingGame.fire
View file @
f184512c
This diff is collapsed.
Click to expand it.
assets/L5R3_GuessingGame/scene/L5R3_GuessingGame.ts
View file @
f184512c
...
@@ -38,6 +38,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -38,6 +38,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
myCardRoot
=
null
myCardRoot
=
null
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
inputNode
=
null
inputNode
=
null
@
property
(
cc
.
Label
)
lb_youSay
=
null
@
property
(
cc
.
SpriteFrame
)
@
property
(
cc
.
SpriteFrame
)
cardList
=
[]
cardList
=
[]
...
@@ -345,9 +347,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -345,9 +347,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
cards
=
this
.
cardRoot
.
children
;
let
cards
=
this
.
cardRoot
.
children
;
for
(
let
i
=
0
;
i
<
this
.
cardList
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
cardList
.
length
;
++
i
)
{
let
word
=
this
.
cardList
[
i
].
name
;
let
word
=
this
.
cardList
[
i
].
name
;
cards
[
i
].
getChildByName
(
"
card
"
).
getComponent
(
cc
.
Sprite
).
spriteFrame
=
this
.
cardList
[
i
];
let
cardIcon
=
cards
[
i
].
getChildByName
(
"
card
"
);
cardIcon
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
this
.
cardList
[
i
];
cards
[
i
].
getChildByName
(
"
word
"
).
getComponent
(
cc
.
Label
).
string
=
word
;
cards
[
i
].
getChildByName
(
"
word
"
).
getComponent
(
cc
.
Label
).
string
=
word
;
cards
[
i
].
getChildByName
(
"
finger
"
).
active
=
false
;
cards
[
i
].
getChildByName
(
"
finger
"
).
active
=
false
;
cardIcon
.
scale
=
150
/
cardIcon
.
height
;
this
.
_gameWordList
.
push
(
word
)
this
.
_gameWordList
.
push
(
word
)
}
}
}
}
...
@@ -888,6 +892,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -888,6 +892,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
console
.
log
(
"
匹配问题?
"
)
console
.
log
(
"
匹配问题?
"
)
console
.
log
(
strs
)
console
.
log
(
strs
)
this
.
lb_youSay
.
string
=
"
You said:
"
+
text
;
if
(
strs
.
indexOf
(
text
)
>
-
1
)
{
if
(
strs
.
indexOf
(
text
)
>
-
1
)
{
this
.
playLocalAudio
(
"
right
"
)
this
.
playLocalAudio
(
"
right
"
)
}
else
{
}
else
{
...
...
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