Commit c2dae8a7 authored by 李维's avatar 李维

调整旷工位置

修复最左边选项选择动画,旷工飞出屏幕的问题
parent 12aa1631
This diff is collapsed.
......@@ -144,15 +144,15 @@ cc.Class({
await this.charactorMoveToTarget(idx);
this.hideOtherOptions(idx);
await this.showCharactorAttack();
await this.showCharactorAttack(idx);
imgBg0.active = false;
imgBg1.active = true;
await this.showCharactorAttack();
await this.showCharactorAttack(idx);
imgBg1.active = false;
imgBg2.active = true;
await this.showCharactorAttack();
await this.showCharactorAttack(idx);
nodeOption.active = false;
this.showStar(idx);
......@@ -267,7 +267,7 @@ cc.Class({
this.showLight();
await this.charactorMoveToTarget(idx);
await this.showCharactorAttack();
await this.showCharactorAttack(idx);
this.showSmoke(idx);
this.playEffect('boom');
......@@ -286,12 +286,16 @@ cc.Class({
async charactorMoveToTarget(idx) {
const nodeCharactor = cc.find('Canvas/ImgCar/NodeCharactor');
nodeCharactor.scaleX = idx == 0 ? -1 : 1;
const nodeCharactorTarget = cc.find(`Canvas/NodeOptions/NodeOption_${idx}/BtnOption/NodeCharactorTarget`);
const targetPos = exchangeNodePos(nodeCharactor.parent, nodeCharactorTarget);
await asyncTweenTo(nodeCharactor, 0.5, { x: targetPos.x, y: targetPos.y }, { easing: 'cubicInOut' });
},
async showCharactorAttack() {
async showCharactorAttack(idx) {
const nodeCharactor = cc.find('Canvas/ImgCar/NodeCharactor');
nodeCharactor.scaleX = idx == 0 ? -1 : 1;
const imgCharactor = cc.find('Canvas/ImgCar/NodeCharactor/ImgCharactor');
const dragonBoneNodeCharactor = cc.find('Canvas/ImgCar/NodeCharactor/DragonBoneNodeCharactor');
......@@ -304,6 +308,8 @@ cc.Class({
imgCharactor.active = true;
dragonBoneNodeCharactor.active = false;
nodeCharactor.scaleX = 1;
},
async showSmoke(idx) {
......
......@@ -12,23 +12,5 @@ module.exports = {
wrongWordList: ['ao', 'arl'],
wrongAudioList: ['ao.mp3', 'arl.mp3'],
}]
}, {
audio: 'banana',
questionList: [{
rightAudio: 'baa',
rightWord: 'ba',
wrongWordList: ['pa', 'da'],
wrongAudioList: ['pa.mp3', 'da.mp3'],
}, {
rightAudio: 'na',
rightWord: 'na',
wrongWordList: ['ma', 'ha'],
wrongAudioList: ['ma.mp3', 'ha.mp3'],
}, {
rightAudio: 'na',
rightWord: 'na',
wrongWordList: ['ma', 'ha'],
wrongAudioList: ['ma.mp3', 'ha.mp3'],
}]
}],
}
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