Commit c2dae8a7 authored by 李维's avatar 李维

调整旷工位置

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