Commit 429bc749 authored by yu's avatar yu

9.8调整

parent 85ea6811
...@@ -24,6 +24,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent { ...@@ -24,6 +24,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
} }
onLoadEnd() { onLoadEnd() {
cc.macro.ENABLE_MULTI_TOUCH = false;
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考 // TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this.initData(); this.initData();
this.initView(); this.initView();
...@@ -223,6 +224,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent { ...@@ -223,6 +224,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
} }
} }
onItemTouchStart(e) { onItemTouchStart(e) {
if (this.checkRoundOver()) return;
let target: cc.Node = e.target; let target: cc.Node = e.target;
let data = target.data; let data = target.data;
//已经成功的方块要拒绝掉 //已经成功的方块要拒绝掉
...@@ -232,12 +234,14 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent { ...@@ -232,12 +234,14 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
this.setTouchPos(e); this.setTouchPos(e);
} }
onItemTouchMove(e) { onItemTouchMove(e) {
if (this.checkRoundOver()) return;
let target: cc.Node = e.target; let target: cc.Node = e.target;
let data = target.data; let data = target.data;
//已经成功的方块要拒绝掉 //已经成功的方块要拒绝掉
this.setTouchPos(e); this.setTouchPos(e);
} }
onItemTouchEnd(e) { onItemTouchEnd(e) {
if (this.checkRoundOver()) return;
let target: cc.Node = e.target; let target: cc.Node = e.target;
let data = target.data; let data = target.data;
let itemBg = this.wordItams.find((bg) => { let itemBg = this.wordItams.find((bg) => {
...@@ -259,7 +263,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent { ...@@ -259,7 +263,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
itemBg.errorCount++; itemBg.errorCount++;
if (itemBg.errorCount >= 3) { if (itemBg.errorCount >= 3) {
this.errorThere(target, itemBg); this.errorThere(target, itemBg);
this.playLocalAudio("right"); this.playLocalAudio("right", 0.6);
this.roundOver(); this.roundOver();
} else { } else {
this.playLocalAudio("error"); this.playLocalAudio("error");
...@@ -276,7 +280,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent { ...@@ -276,7 +280,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
let line = cc.find("line", item); let line = cc.find("line", item);
word.active = true; word.active = true;
line.active = false; line.active = false;
this.playLocalAudio("right"); this.playLocalAudio("right", 0.6);
this.roundOver(); this.roundOver();
} }
private moveError(target, data) { private moveError(target, data) {
...@@ -360,22 +364,15 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent { ...@@ -360,22 +364,15 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
let mao_ske = cc.find("mao_ske", this.node); let mao_ske = cc.find("mao_ske", this.node);
let ske = mao_ske.getComponent(dragonBones.ArmatureDisplay).playAnimation(aniName, 0); let ske = mao_ske.getComponent(dragonBones.ArmatureDisplay).playAnimation(aniName, 0);
} }
playLocalAudio(audioName) { playLocalAudio(audioName, volume = 1) {
const audio = cc.find(`Canvas/res/audio/${audioName}`).getComponent(cc.AudioSource); const audio = cc.find(`Canvas/res/audio/${audioName}`).getComponent(cc.AudioSource);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
cc.audioEngine.setEffectsVolume(volume);
const id = cc.audioEngine.playEffect(audio.clip, false); const id = cc.audioEngine.playEffect(audio.clip, false);
cc.audioEngine.setFinishCallback(id, () => { cc.audioEngine.setFinishCallback(id, () => {
cc.audioEngine.setEffectsVolume(1);
resolve(id); resolve(id);
}); });
}) })
} }
} }
/** \ No newline at end of file
* 新游的调整
1. 不是播一个单词 换一轮 是播完所有单词 开始换第二轮
2. 最后弹出完整单词的时候 字母间不要有间距
3. 第二轮不需要题目音频
4. 第二轮 问号是可以点击的 发单词音
5. 播放完成音效的同时 弹出goodjob goodjob不消失
6. 音频加一个第二轮引导音频 在开始第二轮的时候 小猫自动播放第二轮引导音频
*/
\ 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