Commit f184512c authored by 杨一航's avatar 杨一航

add

parent 5977ba48
...@@ -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("audio").active = true; this.winRoot.getChildByName("ani").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() {
......
...@@ -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": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 16 "__id__": 16
...@@ -634,8 +634,8 @@ ...@@ -634,8 +634,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1589, "width": 1241,
"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,
233.201, 269.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,
28.907, 233.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": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 25 "__id__": 25
...@@ -955,8 +963,8 @@ ...@@ -955,8 +963,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1241, "width": 1000,
"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
}, },
{ {
......
...@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment