flutter: audio: Remove onBoardTap()'s duplicate play audio
putPiece() and removePiece() has played.
This commit is contained in:
parent
6f1e7f7d74
commit
e6634c24ca
|
@ -127,10 +127,10 @@ class _GamePageState extends State<GamePage> with RouteAware {
|
||||||
case Act.place:
|
case Act.place:
|
||||||
if (position.putPiece(sq)) {
|
if (position.putPiece(sq)) {
|
||||||
if (position.action == Act.remove) {
|
if (position.action == Act.remove) {
|
||||||
Audios.playTone('mill.mp3');
|
//Audios.playTone('mill.mp3');
|
||||||
changeStatus(S.of(context).tipRemove);
|
changeStatus(S.of(context).tipRemove);
|
||||||
} else {
|
} else {
|
||||||
Audios.playTone('place.mp3');
|
//Audios.playTone('place.mp3');
|
||||||
changeStatus(S.of(context).tipPlaced);
|
changeStatus(S.of(context).tipPlaced);
|
||||||
}
|
}
|
||||||
ret = true;
|
ret = true;
|
||||||
|
@ -161,7 +161,7 @@ class _GamePageState extends State<GamePage> with RouteAware {
|
||||||
|
|
||||||
case Act.remove:
|
case Act.remove:
|
||||||
if (position.removePiece(sq)) {
|
if (position.removePiece(sq)) {
|
||||||
Audios.playTone('remove.mp3');
|
//Audios.playTone('remove.mp3');
|
||||||
ret = true;
|
ret = true;
|
||||||
print("removePiece: [$sq]");
|
print("removePiece: [$sq]");
|
||||||
changeStatus(S.of(context).tipRemoved);
|
changeStatus(S.of(context).tipRemoved);
|
||||||
|
|
Loading…
Reference in New Issue