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

add

parent 5977ba48
......@@ -73,15 +73,20 @@ export default class EndView extends cc.Component {
})
if (win) {
await asyncDelay(0.5)
this.winRoot.getChildByName("audio").active = true;
await asyncDelay(0.5)
this.winRoot.getChildByName("ani").active = true;
await asyncDelay(1)
this.winRoot.getChildByName("audio").active = true;
this.winRoot.getChildByName("ani").active = false;;
} else {
this.loseRoot.getChildByName("ani").active = true;
await asyncDelay(1)
await asyncDelay(0.5)
this.loseRoot.getChildByName("audio").active = true;
await asyncDelay(0.5)
this.loseRoot.getChildByName("ani").active = true;
}
}
replay() {
......
......@@ -609,13 +609,13 @@
},
{
"__type__": "cc.Node",
"_name": "top",
"_name": "ani",
"_objFlags": 0,
"_parent": {
"__id__": 11
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 16
......@@ -634,8 +634,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1589,
"height": 590
"width": 1241,
"height": 656
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -646,8 +646,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
2.65,
233.201,
0,
269.974,
0,
0,
0,
......@@ -672,7 +672,7 @@
"_id": ""
},
{
"__type__": "cc.Sprite",
"__type__": "dragonBones.ArmatureDisplay",
"_name": "",
"_objFlags": 0,
"node": {
......@@ -684,23 +684,31 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "4af41b0b-f45d-4508-b32c-6d7863e4687b"
"_armatureName": "Armature",
"_animationName": "normal",
"_preCacheMode": 0,
"_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,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
"_N$dragonAtlasAsset": {
"__uuid__": "7c47a36a-14d8-4e9e-bd26-8641b2ceb0c6"
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 1,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": ""
},
{
......@@ -711,12 +719,12 @@
"asset": {
"__uuid__": "84b72720-2013-4f2b-b787-52900432f34f"
},
"fileId": "aex+eqEi1MerCIM+owZfyg",
"fileId": "6fCcFF9HxM+5x95Uv5cY4G",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "reward",
"_name": "top",
"_objFlags": 0,
"_parent": {
"__id__": 11
......@@ -741,8 +749,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 416,
"height": 376
"width": 1589,
"height": 590
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -753,8 +761,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
8.259,
28.907,
2.65,
233.201,
0,
0,
0,
......@@ -794,7 +802,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "1f2b6e51-3f77-427c-b96e-f3263966de16"
"__uuid__": "4af41b0b-f45d-4508-b32c-6d7863e4687b"
},
"_type": 0,
"_sizeMode": 1,
......@@ -818,12 +826,12 @@
"asset": {
"__uuid__": "84b72720-2013-4f2b-b787-52900432f34f"
},
"fileId": "532I/hCrFCl7KjGtK+SUXk",
"fileId": "aex+eqEi1MerCIM+owZfyg",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "WIN_",
"_name": "reward",
"_objFlags": 0,
"_parent": {
"__id__": 11
......@@ -848,8 +856,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1000,
"height": 262
"width": 416,
"height": 376
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -861,7 +869,7 @@
"ctor": "Float64Array",
"array": [
8.259,
379.923,
28.907,
0,
0,
0,
......@@ -901,7 +909,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "9b6fd39a-dc70-4101-9f7c-1233c26aa401"
"__uuid__": "1f2b6e51-3f77-427c-b96e-f3263966de16"
},
"_type": 0,
"_sizeMode": 1,
......@@ -925,18 +933,18 @@
"asset": {
"__uuid__": "84b72720-2013-4f2b-b787-52900432f34f"
},
"fileId": "f69yFoeWpCcYXzHA2tLyDK",
"fileId": "532I/hCrFCl7KjGtK+SUXk",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "ani",
"_name": "WIN_",
"_objFlags": 0,
"_parent": {
"__id__": 11
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 25
......@@ -955,8 +963,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1241,
"height": 656
"width": 1000,
"height": 262
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -967,8 +975,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
269.974,
8.259,
379.923,
0,
0,
0,
......@@ -993,7 +1001,7 @@
"_id": ""
},
{
"__type__": "dragonBones.ArmatureDisplay",
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
......@@ -1005,31 +1013,23 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "Armature",
"_animationName": "normal",
"_preCacheMode": 0,
"_cacheMode": 0,
"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"
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "9b6fd39a-dc70-4101-9f7c-1233c26aa401"
},
"_N$dragonAtlasAsset": {
"__uuid__": "7c47a36a-14d8-4e9e-bd26-8641b2ceb0c6"
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 1,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
......@@ -1040,7 +1040,7 @@
"asset": {
"__uuid__": "84b72720-2013-4f2b-b787-52900432f34f"
},
"fileId": "6fCcFF9HxM+5x95Uv5cY4G",
"fileId": "f69yFoeWpCcYXzHA2tLyDK",
"sync": false
},
{
......
......@@ -38,6 +38,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
myCardRoot = null
@property(cc.Node)
inputNode = null
@property(cc.Label)
lb_youSay = null
@property(cc.SpriteFrame)
cardList = []
......@@ -345,9 +347,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
let cards = this.cardRoot.children;
for (let i = 0; i < this.cardList.length; ++i) {
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("finger").active = false;
cardIcon.scale = 150 / cardIcon.height;
this._gameWordList.push(word)
}
}
......@@ -888,6 +892,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
console.log("匹配问题?")
console.log(strs)
this.lb_youSay.string = "You said:" + text;
if (strs.indexOf(text) > -1) {
this.playLocalAudio("right")
} 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