Commit 225ebf93 authored by 李帅's avatar 李帅

+1

parent c5834d39
......@@ -93,37 +93,37 @@
"__id__": 19
},
{
"__id__": 71
"__id__": 70
},
{
"__id__": 76
"__id__": 75
},
{
"__id__": 79
"__id__": 78
},
{
"__id__": 84
"__id__": 83
},
{
"__id__": 87
"__id__": 86
},
{
"__id__": 92
"__id__": 91
},
{
"__id__": 111
"__id__": 110
}
],
"_active": true,
"_components": [
{
"__id__": 115
"__id__": 114
},
{
"__id__": 116
"__id__": 115
},
{
"__id__": 117
"__id__": 116
}
],
"_prefab": null,
......@@ -991,7 +991,7 @@
"_active": true,
"_components": [
{
"__id__": 70
"__id__": 69
}
],
"_prefab": null,
......@@ -1057,16 +1057,16 @@
"__id__": 24
},
{
"__id__": 63
"__id__": 62
}
],
"_active": true,
"_components": [
{
"__id__": 68
"__id__": 67
},
{
"__id__": 69
"__id__": 68
}
],
"_prefab": null,
......@@ -1277,7 +1277,7 @@
"__id__": 61
},
{
"__id__": 62
"__id__": 66
}
],
"_prefab": null,
......@@ -2963,95 +2963,27 @@
"myrecord_play": {
"__id__": 49
},
"_id": "78sbViiXNOl5SgddmNDgr+"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
"low": {
"__id__": 62
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "31+SyJRYdAhZKwR2tVF9rC"
"_id": "78sbViiXNOl5SgddmNDgr+"
},
{
"__type__": "cc.Node",
"_name": "word",
"_name": "low",
"_objFlags": 0,
"_parent": {
"__id__": 20
},
"_children": [
{
"__id__": 64
"__id__": 63
}
],
"_active": false,
"_components": [
{
"__id__": 66
},
{
"__id__": 67
"__id__": 65
}
],
"_prefab": null,
......@@ -3100,35 +3032,35 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "87Rk7XYX1OPKWhI8Zycmb0"
"_id": "c6zMoLHHVNmqIN9si2WDqQ"
},
{
"__type__": "cc.Node",
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 63
"__id__": 62
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 65
"__id__": 64
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 254,
"g": 243,
"b": 213,
"r": 215,
"g": 105,
"b": 32,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 48
"height": 60.48
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3162,14 +3094,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "7fXYYORb9Aoa54n00Dr8ic"
"_id": "adu9FKGgRDRr9Pj196zPSv"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
"__id__": 63
},
"_enabled": true,
"_materials": [
......@@ -3179,8 +3111,8 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "",
"_N$string": "",
"_string": "what",
"_N$string": "what",
"_fontSize": 36,
"_lineHeight": 48,
"_enableWrapText": true,
......@@ -3195,16 +3127,16 @@
"_N$horizontalAlign": 0,
"_N$verticalAlign": 2,
"_N$fontFamily": "Arial",
"_N$overflow": 3,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "b7RdGIuPtB1ZEZubFHRgO+"
"_id": "1aBrXz93VN75xgvLVjuYVZ"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 63
"__id__": 62
},
"_enabled": true,
"_materials": [
......@@ -3215,7 +3147,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "87170b12-fd1d-4b10-b17b-262c0403f815"
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
......@@ -3229,39 +3161,75 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "95zLBYciVFxYr7DO0Fm+V1"
"_id": "35OA3ebdRPII8YwoGtPtdY"
},
{
"__type__": "cc.Layout",
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 63
"__id__": 24
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 0,
"height": 48
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_resize": 1,
"_N$layoutType": 1,
"_N$cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$startAxis": 0,
"_N$paddingLeft": 0,
"_N$paddingRight": 0,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 0,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "d8cvZPUFNEAJCt6YEL0MYQ"
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "31+SyJRYdAhZKwR2tVF9rC"
},
{
"__type__": "cc.Mask",
......@@ -3345,16 +3313,16 @@
},
"_children": [
{
"__id__": 72
"__id__": 71
}
],
"_active": false,
"_components": [
{
"__id__": 74
"__id__": 73
},
{
"__id__": 75
"__id__": 74
}
],
"_prefab": null,
......@@ -3410,13 +3378,13 @@
"_name": "icon_record",
"_objFlags": 0,
"_parent": {
"__id__": 71
"__id__": 70
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 73
"__id__": 72
}
],
"_prefab": null,
......@@ -3472,7 +3440,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
"__id__": 71
},
"_enabled": true,
"_materials": [
......@@ -3512,7 +3480,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 71
"__id__": 70
},
"_enabled": true,
"alignMode": 1,
......@@ -3539,7 +3507,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 71
"__id__": 70
},
"_enabled": true,
"_normalMaterial": null,
......@@ -3613,10 +3581,10 @@
"_active": false,
"_components": [
{
"__id__": 77
"__id__": 76
},
{
"__id__": 78
"__id__": 77
}
],
"_prefab": null,
......@@ -3672,7 +3640,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
"__id__": 75
},
"_enabled": true,
"_materials": [
......@@ -3704,7 +3672,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
"__id__": 75
},
"_enabled": true,
"_normalMaterial": null,
......@@ -3776,13 +3744,13 @@
},
"_children": [
{
"__id__": 80
"__id__": 79
}
],
"_active": false,
"_components": [
{
"__id__": 83
"__id__": 82
}
],
"_prefab": null,
......@@ -3838,16 +3806,16 @@
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 79
"__id__": 78
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 81
"__id__": 80
},
{
"__id__": 82
"__id__": 81
}
],
"_prefab": null,
......@@ -3903,7 +3871,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
"__id__": 79
},
"_enabled": true,
"_materials": [
......@@ -3938,7 +3906,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
"__id__": 79
},
"_enabled": false,
"_color": {
......@@ -3956,7 +3924,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 79
"__id__": 78
},
"_enabled": true,
"_materials": [
......@@ -3994,10 +3962,10 @@
"_active": false,
"_components": [
{
"__id__": 85
"__id__": 84
},
{
"__id__": 86
"__id__": 85
}
],
"_prefab": null,
......@@ -4053,7 +4021,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 84
"__id__": 83
},
"_enabled": true,
"_materials": [
......@@ -4085,7 +4053,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 84
"__id__": 83
},
"_enabled": true,
"_normalMaterial": null,
......@@ -4157,16 +4125,16 @@
},
"_children": [
{
"__id__": 88
"__id__": 87
}
],
"_active": true,
"_components": [
{
"__id__": 90
"__id__": 89
},
{
"__id__": 91
"__id__": 90
}
],
"_prefab": null,
......@@ -4222,13 +4190,13 @@
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 87
"__id__": 86
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 89
"__id__": 88
}
],
"_prefab": null,
......@@ -4284,7 +4252,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 88
"__id__": 87
},
"_enabled": true,
"_materials": [
......@@ -4317,7 +4285,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 87
"__id__": 86
},
"_enabled": true,
"_materials": [
......@@ -4349,7 +4317,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 87
"__id__": 86
},
"_enabled": true,
"alignMode": 1,
......@@ -4380,25 +4348,25 @@
},
"_children": [
{
"__id__": 93
"__id__": 92
},
{
"__id__": 97
"__id__": 96
},
{
"__id__": 100
"__id__": 99
},
{
"__id__": 102
"__id__": 101
},
{
"__id__": 106
"__id__": 105
}
],
"_active": false,
"_components": [
{
"__id__": 110
"__id__": 109
}
],
"_prefab": null,
......@@ -4454,19 +4422,19 @@
"_name": "mask",
"_objFlags": 0,
"_parent": {
"__id__": 92
"__id__": 91
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 94
"__id__": 93
},
{
"__id__": 95
"__id__": 94
},
{
"__id__": 96
"__id__": 95
}
],
"_prefab": null,
......@@ -4522,7 +4490,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
"__id__": 92
},
"_enabled": true,
"_materials": [
......@@ -4554,7 +4522,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
"__id__": 92
},
"_enabled": true,
"alignMode": 1,
......@@ -4581,7 +4549,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
"__id__": 92
},
"_enabled": true,
"_normalMaterial": null,
......@@ -4649,16 +4617,16 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 92
"__id__": 91
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 98
"__id__": 97
},
{
"__id__": 99
"__id__": 98
}
],
"_prefab": null,
......@@ -4714,7 +4682,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 97
"__id__": 96
},
"_enabled": true,
"_materials": [
......@@ -4746,7 +4714,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 97
"__id__": 96
},
"_enabled": true,
"_normalMaterial": null,
......@@ -4807,7 +4775,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 97
"__id__": 96
},
"_id": "dbf6SlfeFJtqujsCK52/CR"
},
......@@ -4816,13 +4784,13 @@
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 92
"__id__": 91
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 101
"__id__": 100
}
],
"_prefab": null,
......@@ -4837,7 +4805,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 800,
"height": 0
"height": 60.480000000000004
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -4878,7 +4846,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 100
"__id__": 99
},
"_enabled": true,
"_materials": [
......@@ -4913,16 +4881,16 @@
"_name": "start",
"_objFlags": 0,
"_parent": {
"__id__": 92
"__id__": 91
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 103
"__id__": 102
},
{
"__id__": 104
"__id__": 103
}
],
"_prefab": null,
......@@ -4978,7 +4946,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 102
"__id__": 101
},
"_enabled": true,
"_materials": [
......@@ -5010,7 +4978,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 102
"__id__": 101
},
"_enabled": true,
"_normalMaterial": null,
......@@ -5019,7 +4987,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 105
"__id__": 104
}
],
"_N$interactable": true,
......@@ -5075,7 +5043,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 102
"__id__": 101
},
"_id": "f86X4c6OtP4K2F2ODiAK9B"
},
......@@ -5094,16 +5062,16 @@
"_name": "restart",
"_objFlags": 0,
"_parent": {
"__id__": 92
"__id__": 91
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 107
"__id__": 106
},
{
"__id__": 108
"__id__": 107
}
],
"_prefab": null,
......@@ -5159,7 +5127,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 106
"__id__": 105
},
"_enabled": true,
"_materials": [
......@@ -5191,7 +5159,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 106
"__id__": 105
},
"_enabled": true,
"_normalMaterial": null,
......@@ -5200,7 +5168,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 109
"__id__": 108
}
],
"_N$interactable": true,
......@@ -5275,7 +5243,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 92
"__id__": 91
},
"_enabled": true,
"alignMode": 1,
......@@ -5306,7 +5274,7 @@
},
"_children": [
{
"__id__": 112
"__id__": 111
}
],
"_active": true,
......@@ -5364,11 +5332,11 @@
"_name": "audio",
"_objFlags": 0,
"_parent": {
"__id__": 111
"__id__": 110
},
"_children": [
{
"__id__": 113
"__id__": 112
}
],
"_active": true,
......@@ -5426,13 +5394,13 @@
"_name": "btn",
"_objFlags": 0,
"_parent": {
"__id__": 112
"__id__": 111
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 114
"__id__": 113
}
],
"_prefab": null,
......@@ -5488,7 +5456,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 113
"__id__": 112
},
"_enabled": true,
"_clip": {
......@@ -5561,7 +5529,7 @@
"__id__": 21
},
"tip": {
"__id__": 92
"__id__": 91
},
"_id": "eaTVUpqahPfZeO9+sUI7RP"
}
......
/*
* @Author: ls
* @Date: 2022-05-15 18:22:18
* @LastEditTime: 2022-05-31 21:56:35
* @LastEditTime: 2022-06-08 23:00:12
* @LastEditors: ls
* @Description:
* @FilePath: \ls_gramophone\assets\ls_gramophone\scene\ls_gramophone.ts
......@@ -236,7 +236,34 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.log(`录音的音频URL是${JSON.parse(res).audioUrl}`);
if (idx !== -1) {
this.content.children[idx].getComponent(Item).recorded();
let it = this.content.children[idx].getComponent(Item);
it.recorded();
let arr = JSON.parse(res).result.sentences[0].details;
let arrOne = [];
for (let index = 0; index < arr.length; index++) {
let e = arr[index];
arrOne.push({ key: e.word, value: 1 });
let result = {};
arrOne.forEach((item) => {
if (result[item.key]) {
result[item.key] += item.value;
} else {
result[item.key] = item.value;
}
});
for (let k in result) {
if (k === e.word) {
if (e.overall < 40) {
it.setLow(e.word, result[k]);
}
}
}
}
}
this.resetRecord();
......
/*
* @Author: ls
* @Date: 2022-05-21 21:59:51
* @LastEditTime: 2022-05-31 21:15:17
* @LastEditTime: 2022-06-08 22:57:27
* @LastEditors: ls
* @Description:
* @FilePath: \ls_gramophone\assets\ls_gramophone\script\Item.ts
......@@ -31,6 +31,9 @@ export default class Item extends cc.Component {
@property(cc.Node)
myrecord_play: cc.Node = null;
@property(cc.Node)
low: cc.Node = null;
// 录制中
_recording = false;
// 已录音
......@@ -144,6 +147,7 @@ export default class Item extends cc.Component {
this.tip.active = true;
// this.label.node.color = cc.color(255, 96, 0);
this.label.node.color = cc.color(108, 185, 0);
this.hideLow();
}
/**
......@@ -152,5 +156,37 @@ export default class Item extends cc.Component {
stop() {
this.tip.active = false;
this.label.node.color = cc.color(44, 77, 140);
this.showLow();
}
hideLow() {
this.label.node.children.forEach((e) => {
e.active = false;
});
}
showLow() {
this.label.node.children.forEach((e) => {
e.active = true;
});
}
clearLow() {
this.label.node.removeAllChildren();
}
setLow(str: string, index: number = 1) {
let ps = this.label.getTargetStringPos(str);
if (index > ps.length) {
return;
}
let p = ps[index - 1];
let low = cc.instantiate(this.low);
low.parent = this.label.node;
low.active = true;
low.width = p.z;
low.getComponentInChildren(cc.Label).string = str;
low.setPosition(p.y, (p.x - 1) * 48);
}
}
/*
* @Author: ls
* @Date: 2022-05-15 18:22:18
* @LastEditTime: 2022-05-22 00:13:54
* @LastEditTime: 2022-06-08 21:16:09
* @LastEditors: ls
* @Description:
* @FilePath: \ls_gramophone\assets\ls_gramophone\script\defaultData.ts
......@@ -19,7 +19,7 @@ export const defaultData = {
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
{
text: 'Good morning',
text: 'what can i do for you',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
{
......@@ -34,21 +34,5 @@ export const defaultData = {
text: 'Hello, how dare you, Hello, how dare you',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
{
text: 'Hello, how dare you, Hello, how dare you',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
{
text: 'Hello, how dare you, Hello, how dare you',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
{
text: 'Hello, how dare you, Hello, how dare you',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
{
text: 'Hello, how dare you, Hello, how dare you',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
],
};
/*
* @Author: ls
* @Date: 2022-05-21 18:06:20
* @LastEditTime: 2022-05-31 22:45:56
* @LastEditTime: 2022-06-08 21:39:12
* @LastEditors: ls
* @Description:
* @FilePath: \ls_gramophone\assets\ls_gramophone\script\simpleLabel.ts
......@@ -142,7 +142,7 @@ export default class simpleLabel extends cc.Component {
getTargetStringPos(str: string) {
let poss = [];
let rows = 0;
let rows = this._rows;
let lastString = '';
if (this._sourceArray && this._sourceArray.length) {
for (let index = 0; index < this._sourceArray.length; index++) {
......@@ -162,22 +162,20 @@ export default class simpleLabel extends cc.Component {
// 增加行数
lastString = element;
tempString = '';
rows++;
rows--;
}
let temp = element;
if (element.indexOf(',') !== -1) {
temp.substring(element.indexOf(','), 1);
} else if (element.indexOf('.') !== -1) {
temp.substring(element.indexOf('.'), 1);
} else if (element.indexOf('!') !== -1) {
temp.substring(element.indexOf('!'), 1);
} else if (element.indexOf('?') !== -1) {
temp.substring(element.indexOf('?'), 1);
if (element.indexOf(',') !== -1 || element.indexOf('.') !== -1 || element.indexOf('!') !== -1 || element.indexOf('?') !== -1) {
temp = temp.substring(0, temp.length - 1);
}
if (temp === str) {
poss.push(rows, this.getLetterWidth(this.label, tempString), this.getLetterWidth(this.label, str));
let x = this.getLetterWidth(this.label, tempString);
if (x !== 0) {
x += this.getLetterWidth(this.label, ' ');
}
poss.push(cc.v3(rows, x, this.getLetterWidth(this.label, str)));
}
}
}
......
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