Commit a142afd7 authored by huoshizhe's avatar huoshizhe

fix: bugs

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