Commit 2d3ac2b9 authored by Tt's avatar Tt

bug修复 字体更换待处理公共内容

parent e41f742d
{
"ver": "1.1.0",
"uuid": "ce03a98b-db6a-4cfd-8bc5-f651ecb70ec5",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "32baa0a8-ccb9-4586-8805-55df5ad154d6",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "b6526ba1-a312-466b-98b0-fb0e4c49c488",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "95f57760-9ad9-41aa-8c8d-49e71a2ecb38",
"subMetas": {}
}
\ No newline at end of file
......@@ -1081,7 +1081,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"width": 109.93,
"height": 65.52
},
"_anchorPoint": {
......@@ -1135,11 +1135,13 @@
"_dstBlendFactor": 771,
"_string": "",
"_N$string": "",
"_fontSize": 52,
"_lineHeight": 52,
"_fontSize": 55,
"_lineHeight": 55,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_N$file": {
"__uuid__": "b6526ba1-a312-466b-98b0-fb0e4c49c488"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
......@@ -1561,7 +1563,7 @@
"__id__": 32
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 34
......@@ -1640,8 +1642,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 183.52,
"height": 75.6
"width": 225.16,
"height": 126
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1652,7 +1654,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
50,
81.33,
-30,
0,
0,
......@@ -1694,11 +1696,13 @@
"_dstBlendFactor": 771,
"_string": "58.198",
"_N$string": "58.198",
"_fontSize": 60,
"_lineHeight": 60,
"_fontSize": 90,
"_lineHeight": 100,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_N$file": {
"__uuid__": "32baa0a8-ccb9-4586-8805-55df5ad154d6"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
......@@ -1833,8 +1837,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 183.52,
"height": 75.6
"width": 225.16,
"height": 126
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1845,7 +1849,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
50,
81.33,
-30,
0,
0,
......@@ -1868,7 +1872,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "d8kRzVywNPibGWOTNd1k8M"
"_id": "b04mSMnDNFFb6m08l/Us7s"
},
{
"__type__": "cc.Label",
......@@ -1885,13 +1889,15 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "58.189",
"_N$string": "58.189",
"_fontSize": 60,
"_lineHeight": 60,
"_string": "58.198",
"_N$string": "58.198",
"_fontSize": 90,
"_lineHeight": 100,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_N$file": {
"__uuid__": "32baa0a8-ccb9-4586-8805-55df5ad154d6"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
......@@ -1901,7 +1907,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "a4TqRVFnFC7YSU0wdifXrh"
"_id": "b3GLz/oAVDnYopkTRBiAG1"
},
{
"__type__": "cc.Sprite",
......@@ -2194,7 +2200,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"width": 100,
"height": 40
},
"_anchorPoint": {
......@@ -2249,7 +2255,7 @@
"_spriteFrame": {
"__uuid__": "188cf4e0-e904-4deb-a4fc-6a3c295984e1"
},
"_type": 0,
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
......@@ -2403,7 +2409,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 28.36,
"width": 30.09,
"height": 64.26
},
"_anchorPoint": {
......@@ -2415,8 +2421,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
10,
0.43999999999999995,
9.128,
0,
0,
0,
......@@ -2460,8 +2466,10 @@
"_fontSize": 51,
"_lineHeight": 51,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_N$file": {
"__uuid__": "ce03a98b-db6a-4cfd-8bc5-f651ecb70ec5"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
......@@ -2567,7 +2575,7 @@
"ctor": "Float64Array",
"array": [
0,
0,
-4,
0,
0,
0,
......@@ -2816,7 +2824,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
236,
229.226,
754,
0,
0,
......@@ -3180,7 +3188,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 22.25,
"width": 23.6,
"height": 50.4
},
"_anchorPoint": {
......@@ -3237,8 +3245,10 @@
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_N$file": {
"__uuid__": "ce03a98b-db6a-4cfd-8bc5-f651ecb70ec5"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
......@@ -3275,7 +3285,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 44.49,
"width": 47.2,
"height": 50.4
},
"_anchorPoint": {
......@@ -3332,8 +3342,10 @@
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_N$file": {
"__uuid__": "ce03a98b-db6a-4cfd-8bc5-f651ecb70ec5"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
......@@ -3370,7 +3382,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 44.49,
"width": 47.2,
"height": 50.4
},
"_anchorPoint": {
......@@ -3382,7 +3394,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
236,
229.226,
820,
0,
0,
......@@ -3427,8 +3439,10 @@
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_N$file": {
"__uuid__": "ce03a98b-db6a-4cfd-8bc5-f651ecb70ec5"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
......@@ -3763,7 +3777,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 572,
"width": 547.35,
"height": 65.52
},
"_anchorPoint": {
......@@ -3815,13 +3829,15 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "请在秒内说出正确答案",
"_N$string": "请在秒内说出正确答案",
"_string": "请在5秒内说出正确答案",
"_N$string": "请在5秒内说出正确答案",
"_fontSize": 52,
"_lineHeight": 52,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_N$file": {
"__uuid__": "b6526ba1-a312-466b-98b0-fb0e4c49c488"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
......
......@@ -97,10 +97,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
getCurrent() {
return this.data.options[this.currentId];
}
getNext() {
return this.data.options[this.currentId + 1];
}
async initGame() {
// this.showCamera();
// await this.showBegin()
// this.hideBegin();
this.showCamera();
await this.showBegin()
this.hideBegin();
this.startQuestion();
}
......@@ -128,10 +131,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.aniBottomEnter().then(() => {
pg.hw.playAudio('readyGo', false, () => {
});
cc.tween(ready).to(1, { y: -20 }).to(0.2, { y: 0 }).delay(0.3).call(() => {
cc.tween(ready).to(1, { y: -50 }).to(0.2, { y: 0 }).delay(0.3).call(() => {
ready.active = false;
}).start();
cc.tween(go).delay(1).to(1, { y: -20 }).to(0.2, { y: 0 }).delay(0.5).call(() => {
cc.tween(go).delay(1.3).to(1, { y: -50 }).to(0.2, { y: 0 }).delay(0.5).call(() => {
go.active = false;
resolve('');
}).start();
......@@ -167,7 +170,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.gameStart = true;
this.state = State.Recording;
this.currentItemQuestion = this.createQuestionItem(cc.v2(0, 50));
this.updateQuestion();
this.updateQuestion(this.currentItemQuestion, this.getCurrent());
this.updateProgress();
}
......@@ -183,13 +186,27 @@ export default class SceneComponent extends MyCocosSceneComponent {
//题目
updateQuestion() {
let itemQuestion = this.currentItemQuestion;
let data = this.getCurrent();
pg.view.setNetImg(pg.view.find(itemQuestion, "img"), data.image, { w: 700, h: 360 })
pg.view.setString(pg.view.find(itemQuestion, "text"), data.text)
updateQuestion(item, data) {
pg.view.setNetImg(pg.view.find(item, "img"), data.image, { w: 700, h: 360 })
pg.view.setString(pg.view.find(item, "text"), data.text)
}
nextQuestion() {
this.currentId++;
if (!this.getCurrent()) {
this.gameOver();
return;
}
this.hideAnswer();
this.nextItemQuestion = this.createQuestionItem(cc.v2(2000, 50));
this.updateQuestion(this.nextItemQuestion, this.getCurrent());
pg.hw.playLocalAudio('showCard')
cc.tween(this.currentItemQuestion).to(0.5, { x: -2000, y: 50 }).start();
cc.tween(this.nextItemQuestion).to(0.5, { x: 0, y: 50 }).call(() => {
this.currentItemQuestion.parent = null;
this.currentItemQuestion = this.nextItemQuestion;
this.nextItemQuestion = null;
}).start();
}
//------------------------------Loop----------------------------------
private gameStart: boolean;
private state: number;
......@@ -225,13 +242,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
break;
case State.RecordShow:
this.state = State.Recording;
this.hideAnswer();
this.currentId++;
if (!this.getCurrent()) {
this.gameOver();
return;
}
this.updateQuestion()
this.nextQuestion()
break;
}
}
......@@ -258,11 +269,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
//回答正确后回调
onAnswerRight(row) {
//答对题目数
pg.hw.playLocalAudio('right');
this.right += 1
row.children[0].active = true
this.updateProgressPercent();
}
onAnswerError(row) {
pg.hw.playLocalAudio('mistake');
//错误音频
pg.audio.playAudioByUrl(this.getCurrent().audio);
//错误
......@@ -347,10 +360,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
//星星切换
for (let i = 1; i <= 3; i++) {
if (this.right == Math.round(this.data.options.length / 3 * i)) {
layout_progress.children[2].children[i - 1].active = false
layout_progress.children[2].children[i + 2].active = true
layout_progress.getChildByName("star2").children[i - 1].active = false
layout_progress.getChildByName("star2").children[i + 2].active = true
}
if (this.right == Math.round(this.data.options.length / 3 * 2)) {
layout_progress.getChildByName('ProgressBar').getChildByName('ColoredProgressBar').active = true
}
if (this.right == Math.round(this.data.options.length / 3 * 2)) layout_progress.children[0].children[1].active = true
}
//进度条
this.lengthProgress += 1 / this.data.options.length
......
......@@ -28,8 +28,8 @@
"rawHeight": 42,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"borderLeft": 13,
"borderRight": 11,
"subMetas": {}
}
}
......
......@@ -28,8 +28,8 @@
"rawHeight": 40,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"borderLeft": 14,
"borderRight": 17,
"subMetas": {}
}
}
......
......@@ -2,6 +2,6 @@
"ver": "2.0.1",
"uuid": "f74eb491-1495-417c-9c21-25a480709072",
"downloadMode": 0,
"duration": 3.168,
"duration": 2.664,
"subMetas": {}
}
\ No newline at end of file
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