Skip to content

Commit

Permalink
fixed all sound effect
Browse files Browse the repository at this point in the history
  • Loading branch information
Tonywangshaohui committed Oct 14, 2022
1 parent 5326765 commit 704fb16
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/core/assets/configs/playerStatsInfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"playerStats":[{"timeRemaining":7000,"result":1,"attempt":1},{"timeRemaining":6500,"result":1,"attempt":2},{"timeRemaining":6400,"result":1,"attempt":2},{"timeRemaining":7000,"result":1,"attempt":2},{"timeRemaining":7255,"result":1,"attempt":1},{"timeRemaining":7255,"result":1,"attempt":1},{"timeRemaining":7255,"result":1,"attempt":1},{"timeRemaining":7218,"result":1,"attempt":1},{"timeRemaining":7255,"result":1,"attempt":1},{"timeRemaining":4688,"result":1,"attempt":3},{"timeRemaining":5216,"result":2,"attempt":3},{"timeRemaining":4679,"result":2,"attempt":3},{"timeRemaining":7204,"result":1,"attempt":1},{"timeRemaining":7254,"result":1,"attempt":1},{"timeRemaining":5215,"result":2,"attempt":3},{"timeRemaining":7230,"result":1,"attempt":1},{"timeRemaining":5216,"result":2,"attempt":3},{"timeRemaining":6027,"result":1,"attempt":2},{"timeRemaining":5135,"result":2,"attempt":3},{"timeRemaining":5209,"result":1,"attempt":3},{"timeRemaining":5218,"result":1,"attempt":3},{"timeRemaining":5218,"result":1,"attempt":3},{"timeRemaining":5220,"result":1,"attempt":3},{"timeRemaining":5220,"result":1,"attempt":3},{"timeRemaining":5216,"result":1,"attempt":3},{"timeRemaining":5220,"result":1,"attempt":3},{"timeRemaining":5213,"result":1,"attempt":3},{"timeRemaining":7240,"result":1,"attempt":1},{"timeRemaining":5210,"result":1,"attempt":3},{"timeRemaining":7246,"result":1,"attempt":1},{"timeRemaining":6520,"result":1,"attempt":1},{"timeRemaining":7227,"result":1,"attempt":1},{"timeRemaining":7246,"result":1,"attempt":1},{"timeRemaining":5219,"result":1,"attempt":3},{"timeRemaining":5219,"result":1,"attempt":3},{"timeRemaining":5209,"result":1,"attempt":3},{"timeRemaining":5220,"result":1,"attempt":3},{"timeRemaining":7198,"result":1,"attempt":1},{"timeRemaining":5213,"result":2,"attempt":3},{"timeRemaining":5210,"result":2,"attempt":3},{"timeRemaining":5209,"result":2,"attempt":3},{"timeRemaining":7214,"result":1,"attempt":1},{"timeRemaining":5219,"result":2,"attempt":3},{"timeRemaining":7252,"result":1,"attempt":1},{"timeRemaining":6513,"result":1,"attempt":2},{"timeRemaining":5206,"result":1,"attempt":3},{"timeRemaining":5208,"result":1,"attempt":3}]}
{"playerStats":[{"timeRemaining":7000,"result":1,"attempt":1},{"timeRemaining":6500,"result":1,"attempt":2},{"timeRemaining":6400,"result":1,"attempt":2},{"timeRemaining":7000,"result":1,"attempt":2},{"timeRemaining":7255,"result":1,"attempt":1},{"timeRemaining":7255,"result":1,"attempt":1},{"timeRemaining":7255,"result":1,"attempt":1},{"timeRemaining":7218,"result":1,"attempt":1},{"timeRemaining":7255,"result":1,"attempt":1},{"timeRemaining":4688,"result":1,"attempt":3},{"timeRemaining":5216,"result":2,"attempt":3},{"timeRemaining":4679,"result":2,"attempt":3},{"timeRemaining":7204,"result":1,"attempt":1},{"timeRemaining":7254,"result":1,"attempt":1},{"timeRemaining":5215,"result":2,"attempt":3},{"timeRemaining":7230,"result":1,"attempt":1},{"timeRemaining":5216,"result":2,"attempt":3},{"timeRemaining":6027,"result":1,"attempt":2},{"timeRemaining":5135,"result":2,"attempt":3},{"timeRemaining":5209,"result":1,"attempt":3},{"timeRemaining":5218,"result":1,"attempt":3},{"timeRemaining":5218,"result":1,"attempt":3},{"timeRemaining":5220,"result":1,"attempt":3},{"timeRemaining":5220,"result":1,"attempt":3},{"timeRemaining":5216,"result":1,"attempt":3},{"timeRemaining":5220,"result":1,"attempt":3},{"timeRemaining":5213,"result":1,"attempt":3},{"timeRemaining":7240,"result":1,"attempt":1},{"timeRemaining":5210,"result":1,"attempt":3},{"timeRemaining":7246,"result":1,"attempt":1},{"timeRemaining":6520,"result":1,"attempt":1},{"timeRemaining":7227,"result":1,"attempt":1},{"timeRemaining":7246,"result":1,"attempt":1},{"timeRemaining":5219,"result":1,"attempt":3},{"timeRemaining":5219,"result":1,"attempt":3},{"timeRemaining":5209,"result":1,"attempt":3},{"timeRemaining":5220,"result":1,"attempt":3},{"timeRemaining":7198,"result":1,"attempt":1},{"timeRemaining":5213,"result":2,"attempt":3},{"timeRemaining":5210,"result":2,"attempt":3},{"timeRemaining":5209,"result":2,"attempt":3},{"timeRemaining":7214,"result":1,"attempt":1},{"timeRemaining":5219,"result":2,"attempt":3},{"timeRemaining":7252,"result":1,"attempt":1},{"timeRemaining":6513,"result":1,"attempt":2},{"timeRemaining":5206,"result":1,"attempt":3},{"timeRemaining":5208,"result":1,"attempt":3},{"timeRemaining":5202,"result":1,"attempt":3},{"timeRemaining":5208,"result":2,"attempt":3}]}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void changed(ChangeEvent changeEvent, Actor actor) {
new ChangeListener() {
@Override
public void changed(ChangeEvent changeEvent, Actor actor) {
MusicStuff.playMusic(buttonPath, false);
MusicStuff.playMusic("sounds/OpenEvictionMenu.wav", false);
//in this component we call NpcEvictionMenuDisplayNew component by using its mother entity(i.e MainGameScrenn ui entity).
stage.addActor(entity.getComponent(NpcEvictionMenuDisplayNew.class).creatEvictionMenu());
//NpcEvictionMenuDisplayNew npc = new NpcEvictionMenuDisplayNew(logger,ServiceLocator.getResourceService(),stage.getWidth(),stage.getHeight()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public void changed(ChangeEvent changeEvent, Actor actor) {
buttons[i].addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent changeEvent, Actor actor) {
MusicStuff.playMusic("sounds/OpenEvictionMenu.wav", false);
MusicStuff.playMusic(buttonPath,false);
logger.debug("button" + index + "clicked");
createConfirmDialog(cardNames[index]);
}
Expand Down Expand Up @@ -543,6 +543,7 @@ private void createResultDialog(String button_name, NpcResultDialogType type) {
public void changed(ChangeEvent changeEvent, Actor actor) {
logger.info("yes_button from " + button_name + " clicked");
//when you select ok button
MusicStuff.playMusic(buttonPath,false);
dialog.remove();
if (type == NpcResultDialogType.RIGHT_BOX)
handleWin();
Expand Down

0 comments on commit 704fb16

Please sign in to comment.