Commit b033f7eb authored by 杨一航's avatar 杨一航

音频优化

parent 8b16b7cb
{ {
"ver": "2.0.1", "ver": "2.0.1",
"uuid": "61c90b3d-7147-46b8-a8e9-b7f19726196f", "uuid": "c893db8b-68b6-4f1a-a35a-983fb376ece7",
"downloadMode": 0, "downloadMode": 0,
"duration": 0.6818, "duration": 3.343673,
"subMetas": {} "subMetas": {}
} }
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "d982949c-bff2-4ae3-b847-9ba05ddd961a",
"downloadMode": 0,
"duration": 0.888163,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "2634b981-e21c-4670-ba5f-096b815eb072",
"downloadMode": 0,
"duration": 0.636667,
"subMetas": {}
}
\ No newline at end of file
...@@ -392,6 +392,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -392,6 +392,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
this._canClick = true; this._canClick = true;
} else { } else {
this.greyDice(); this.greyDice();
asyncDelay(0.2).then(() => {
this.playLocalAudio("otherturn")
})
} }
// this.rollPiece(); // this.rollPiece();
...@@ -672,7 +675,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -672,7 +675,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
roundEndCheck(ani?) { roundEndCheck(isRight?) {
const blueHead = cc.find("Canvas/road/blueHead"); const blueHead = cc.find("Canvas/road/blueHead");
const redHead = cc.find("Canvas/road/redHead"); const redHead = cc.find("Canvas/road/redHead");
...@@ -680,7 +683,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -680,7 +683,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
blueHead.getChildByName("tree").getComponent(cc.ProgressBar).progress = this._status.Blue / (this._cardList.length - 1); blueHead.getChildByName("tree").getComponent(cc.ProgressBar).progress = this._status.Blue / (this._cardList.length - 1);
redHead.getChildByName("tree").getComponent(cc.ProgressBar).progress = this._status.Red / (this._cardList.length - 1); redHead.getChildByName("tree").getComponent(cc.ProgressBar).progress = this._status.Red / (this._cardList.length - 1);
if (ani) { if (isRight) {
if (this.isMySide) { if (this.isMySide) {
this.cat.getComponent(dragonBones.ArmatureDisplay).playAnimation("right", 1); this.cat.getComponent(dragonBones.ArmatureDisplay).playAnimation("right", 1);
...@@ -731,6 +734,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -731,6 +734,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const yourTurn = cc.find("Canvas/yourturn"); const yourTurn = cc.find("Canvas/yourturn");
yourTurn.active = true; yourTurn.active = true;
this.playLocalAudio("youturnTip")
cc.tween(yourTurn) cc.tween(yourTurn)
.set({ opacity: 0, scale: 5 }) .set({ opacity: 0, scale: 5 })
.to(1, { opacity: 255, scale: 2 }) .to(1, { opacity: 255, scale: 2 })
...@@ -926,6 +930,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -926,6 +930,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
!this.isMySide && this.playLocalAudio("right"); !this.isMySide && this.playLocalAudio("right");
this._status = JSON.parse(JSON.stringify(item.data.status)); this._status = JSON.parse(JSON.stringify(item.data.status));
await this.fixStep(); await this.fixStep();
await asyncDelay(2);
this.roundEndCheck(true); this.roundEndCheck(true);
} else if (item.data.type == "SERVER_playerWrong") { } else if (item.data.type == "SERVER_playerWrong") {
...@@ -937,6 +942,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -937,6 +942,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
} else { } else {
await this.pieceGoBack(); await this.pieceGoBack();
} }
await asyncDelay(2);
this.roundEndCheck(); this.roundEndCheck();
} else if (item.data.type == "SERVER_playerWin") { } else if (item.data.type == "SERVER_playerWin") {
this._status = JSON.parse(JSON.stringify(item.data.status)); this._status = JSON.parse(JSON.stringify(item.data.status));
......
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