Commit cc4a5aab authored by huoshizhe's avatar huoshizhe

fix: 点击图片发音

parent a6346bad
...@@ -1331,7 +1331,7 @@ ...@@ -1331,7 +1331,7 @@
"__id__": 31 "__id__": 31
} }
], ],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 33 "__id__": 33
...@@ -1504,7 +1504,7 @@ ...@@ -1504,7 +1504,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 206.85, "width": 236.4,
"height": 630 "height": 630
}, },
"_anchorPoint": { "_anchorPoint": {
...@@ -1517,7 +1517,7 @@ ...@@ -1517,7 +1517,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
166.227, 166.227,
-163.965, -151.905,
0, 0,
0, 0,
0, 0,
...@@ -1557,9 +1557,9 @@ ...@@ -1557,9 +1557,9 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": false, "_useOriginalSize": false,
"_string": "b", "_string": "d",
"_N$string": "b", "_N$string": "d",
"_fontSize": 350, "_fontSize": 400,
"_lineHeight": 500, "_lineHeight": 500,
"_enableWrapText": true, "_enableWrapText": true,
"_N$file": { "_N$file": {
...@@ -1660,7 +1660,7 @@ ...@@ -1660,7 +1660,7 @@
"__id__": 37 "__id__": 37
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 39 "__id__": 39
...@@ -5215,7 +5215,7 @@ ...@@ -5215,7 +5215,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "4cKn+V8UFLVKP9tDHUzMgQ" "_id": "95TzRfxGtAPqVBIKFshkGt"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -5251,7 +5251,7 @@ ...@@ -5251,7 +5251,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "8bHa1soxFF8osf8ne4KMJ5" "_id": "42JZmLHc5Ba5H5wNk+kNn1"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -5314,7 +5314,7 @@ ...@@ -5314,7 +5314,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "4e5WyOVXZDSrooCwVpMHml" "_id": "95EExnKwRMZLqjBpCXr0KG"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -5350,7 +5350,7 @@ ...@@ -5350,7 +5350,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "0cAXl3pkFBvpUoGLm9CCCm" "_id": "d0eezZzRhNtb1VZq22uP/y"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
......
...@@ -472,6 +472,11 @@ cc.Class({ ...@@ -472,6 +472,11 @@ cc.Class({
letterPictureBase.children.forEach(node => node.active = false); letterPictureBase.children.forEach(node => node.active = false);
const letterPictureNode = cc.find(`Canvas/LetterPicturePage/LetterPicture/bg_${this.letter.toLowerCase()}`); const letterPictureNode = cc.find(`Canvas/LetterPicturePage/LetterPicture/bg_${this.letter.toLowerCase()}`);
letterPictureNode.active = true; letterPictureNode.active = true;
letterPictureNode.addComponent(cc.Button);
letterPictureNode.on('click', () => {
jelly(letterPictureNode);
this.playEffect(`word${this.letter.toUpperCase()}`);
});
const changeToBig = cc.find('Canvas/LetterPicturePage/BtnSwitch/ChangeToBig'); const changeToBig = cc.find('Canvas/LetterPicturePage/BtnSwitch/ChangeToBig');
const changeToSmall = cc.find('Canvas/LetterPicturePage/BtnSwitch/ChangeToSmall'); const changeToSmall = cc.find('Canvas/LetterPicturePage/BtnSwitch/ChangeToSmall');
...@@ -524,11 +529,12 @@ cc.Class({ ...@@ -524,11 +529,12 @@ cc.Class({
widgetComponent.bottom = 0; widgetComponent.bottom = 0;
widgetComponent.left = 0; widgetComponent.left = 0;
widgetComponent.right = 0; widgetComponent.right = 0;
widgetComponent.updateAlignment();
if (letter == letter.toLowerCase()) { if (letter == letter.toLowerCase()) {
const monkeyUpperNode = cc.instantiate(this.monkeyUpperNode); const monkeyUpperNode = cc.instantiate(this.monkeyUpperNode);
monkeyUpperNode.parent = letterNodeBase; monkeyUpperNode.parent = letterNodeBase;
monkeyUpperNode.y = -letterNodeBase.height / 2; monkeyUpperNode.y = -letterNodeBase.height / letterNodeBase.scaleY / 2;
} }
const btnUpdate = letterNodeBase.getChildByName('BtnUpdate'); const btnUpdate = letterNodeBase.getChildByName('BtnUpdate');
...@@ -761,7 +767,7 @@ cc.Class({ ...@@ -761,7 +767,7 @@ cc.Class({
.start(); .start();
} }
if (this.checkPointInCircle(this.sharkNode, pos2, 30)) { if (this.checkPointInCircle(this.sharkNode, pos2, 50)) {
this._status.currentStrokeStageIdx++ this._status.currentStrokeStageIdx++
if (this.getCurrentCheckPos() === null) { if (this.getCurrentCheckPos() === null) {
this.drawCompleteLine(this._status.currentStrokeIdx); this.drawCompleteLine(this._status.currentStrokeIdx);
...@@ -777,7 +783,7 @@ cc.Class({ ...@@ -777,7 +783,7 @@ cc.Class({
} }
const posList = this.getPosListByStrokeIdx(this._status.currentStrokeIdx); const posList = this.getPosListByStrokeIdx(this._status.currentStrokeIdx);
if (!this.checkPointInRangeList(this.node.convertToNodeSpaceAR(location), posList, 30)) { if (!this.checkPointInRangeList(this.node.convertToNodeSpaceAR(location), posList, 50)) {
this._status.currentStrokeStageIdx = 0; this._status.currentStrokeStageIdx = 0;
this.onSharkMoveEnd(event); this.onSharkMoveEnd(event);
return; return;
......
module.exports = { module.exports = {
letterList: [ letterList: [
'A', 'j',
'B', 'B',
'C', 'C',
'D', 'D',
......
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