Commit a142afd7 authored by huoshizhe's avatar huoshizhe

fix: bugs

parent 04872986
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<app-audio-recorder [audioUrl]=" item.audio" (audioUploaded)="onAudioUploadSuccess($event)"> <app-audio-recorder [audioUrl]=" item.audio" (audioUploaded)="onAudioUploadSuccess($event)">
</app-audio-recorder> </app-audio-recorder>
</div> </div>
<span style="height: 30px; font-size: 18px; margin-left: 20px;">(正确的字母与错误的字母一共最多有五个)</span>
<div class="border" style="width: 520px;"> <div class="border" style="width: 520px;">
<span style="height: 30px; font-size: 18px;">正确字母:</span> <span style="height: 30px; font-size: 18px;">正确字母:</span>
<div> <div>
......
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
"array": [ "array": [
0, 0,
0, 0,
509.52063365780083, 510.08150713208005,
0, 0,
0, 0,
0, 0,
...@@ -2113,7 +2113,7 @@ ...@@ -2113,7 +2113,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1280, "width": 1514,
"height": 656 "height": 656
}, },
"_anchorPoint": { "_anchorPoint": {
...@@ -2193,8 +2193,8 @@ ...@@ -2193,8 +2193,8 @@
"alignMode": 1, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 44, "_alignFlags": 44,
"_left": 0, "_left": -117,
"_right": 0, "_right": -117,
"_top": 0, "_top": 0,
"_bottom": 0, "_bottom": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
...@@ -2284,7 +2284,7 @@ ...@@ -2284,7 +2284,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1280, "width": 1514,
"height": 656 "height": 656
}, },
"_anchorPoint": { "_anchorPoint": {
......
...@@ -38,9 +38,6 @@ cc.Class({ ...@@ -38,9 +38,6 @@ cc.Class({
}, },
start() { start() {
let winSize = cc.director.getWinSize();
console.log('winSize = ' + JSON.stringify(winSize));
this.data = defaultData; this.data = defaultData;
this.getData((data) => { this.getData((data) => {
if (data) { if (data) {
...@@ -239,7 +236,10 @@ cc.Class({ ...@@ -239,7 +236,10 @@ cc.Class({
this._status.canCharacterWalk = false; this._status.canCharacterWalk = false;
await this.characterWalk(cakeNode.getPosition()); await this.characterWalk(cakeNode.getPosition());
await asyncTweenBy(cakeNode, 0.7, { y: 100 }); await asyncTweenBy(cakeNode, 0.7, { y: 100 });
this.playCakeEffect(cakeNode);
this.characterGetCake(cakeNode); this.characterGetCake(cakeNode);
await this.characterWalk({ x: 0, y: 50 }); await this.characterWalk({ x: 0, y: 50 });
...@@ -259,6 +259,17 @@ cc.Class({ ...@@ -259,6 +259,17 @@ cc.Class({
this._status.canCharacterWalk = true; this._status.canCharacterWalk = true;
}, },
playCakeEffect(cakeNode) {
const word = cakeNode.getComponent('Cake').word;
const wordData = [
...this.data.rightWordList,
...this.data.wrongWordList
].find(data => data.word == word);
asyncPlayEffectByUrl(wordData.audio);
},
characterGetCake(cakeNode) { characterGetCake(cakeNode) {
cakeNode.parent = cc.find('Canvas/NodeCharacter'); cakeNode.parent = cc.find('Canvas/NodeCharacter');
cakeNode.x = 0; cakeNode.x = 0;
...@@ -356,7 +367,6 @@ cc.Class({ ...@@ -356,7 +367,6 @@ cc.Class({
openDoor() { openDoor() {
const delayTime = 2; const delayTime = 2;
const nodeDoor = cc.find('Canvas/NodeDoor');
const nodeWheel1 = cc.find('Canvas/NodeDoorMask/NodeWheel1'); const nodeWheel1 = cc.find('Canvas/NodeDoorMask/NodeWheel1');
const nodeWheel2 = cc.find('Canvas/NodeDoorMask/NodeWheel2'); const nodeWheel2 = cc.find('Canvas/NodeDoorMask/NodeWheel2');
const nodeWheel3 = cc.find('Canvas/NodeDoorMask/NodeWheel3'); const nodeWheel3 = cc.find('Canvas/NodeDoorMask/NodeWheel3');
...@@ -376,21 +386,12 @@ cc.Class({ ...@@ -376,21 +386,12 @@ cc.Class({
.delay(delayTime) .delay(delayTime)
.by(1, { y: -200 }) .by(1, { y: -200 })
.start(); .start();
// cc.tween(nodeDoor)
// .delay(delayTime)
// .by(1, { y: 300 })
// .start();
}, },
async characterMoveOut() { async characterMoveOut() {
await this.characterWalk({ x: 0, y: 380 }, 4, true); await this.characterWalk({ x: 0, y: 380 }, 4, true);
const nodeCharacter = cc.find('Canvas/NodeCharacter');
const nodeCharacterUp = cc.find('Canvas/NodeCharacter/NodeCharacterUp'); const nodeCharacterUp = cc.find('Canvas/NodeCharacter/NodeCharacterUp');
const nodeCharacterDown = cc.find('Canvas/NodeCharacter/NodeCharacterDown');
const nodeCharacterLeft = cc.find('Canvas/NodeCharacter/NodeCharacterLeft');
const nodeCharacterRight = cc.find('Canvas/NodeCharacter/NodeCharacterRight');
const nodeCharacterFront = cc.find('Canvas/NodeCharacter/NodeCharacterFront'); const nodeCharacterFront = cc.find('Canvas/NodeCharacter/NodeCharacterFront');
nodeCharacterUp.active = true; nodeCharacterUp.active = true;
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 1280, "width": 1514,
"height": 656, "height": 705,
"rawWidth": 1280, "rawWidth": 1514,
"rawHeight": 656, "rawHeight": 705,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
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