Commit 31bc83bb authored by Tt's avatar Tt

落子处理

parent ddc3c8f0
...@@ -596,6 +596,7 @@ export default class L2_boardgame2_SceneComponent extends MyCocosSceneComponent ...@@ -596,6 +596,7 @@ export default class L2_boardgame2_SceneComponent extends MyCocosSceneComponent
this.showStars(piece); this.showStars(piece);
piece['rightTween'] = true; piece['rightTween'] = true;
this.playLocalAudio("落子");
await asyncTweenTo(piece, 1, { await asyncTweenTo(piece, 1, {
x: rightBlock.x + offsetX[color], x: rightBlock.x + offsetX[color],
y: rightBlock.y + offsetY[color], y: rightBlock.y + offsetY[color],
...@@ -626,7 +627,6 @@ export default class L2_boardgame2_SceneComponent extends MyCocosSceneComponent ...@@ -626,7 +627,6 @@ export default class L2_boardgame2_SceneComponent extends MyCocosSceneComponent
} }
piece.stopAllActions(); piece.stopAllActions();
await this.playLocalAudio("落子");
piece.zIndex = 0; piece.zIndex = 0;
} }
...@@ -751,13 +751,13 @@ export default class L2_boardgame2_SceneComponent extends MyCocosSceneComponent ...@@ -751,13 +751,13 @@ export default class L2_boardgame2_SceneComponent extends MyCocosSceneComponent
return; return;
} }
this.playLocalAudio("落子");
await asyncTweenTo( await asyncTweenTo(
node, node,
0.7, 0.7,
{ x: touchStartPos.nodeX, y: touchStartPos.nodeY }, { x: touchStartPos.nodeX, y: touchStartPos.nodeY },
{ easing: "cubicOut" } { easing: "cubicOut" }
); );
this.playLocalAudio("落子");
node.stopAllActions(); node.stopAllActions();
} }
......
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