Closed d1vyanshu-kumar closed 5 months ago
@llaske please review this PR.
@llaske please review it now i think it looks good now.
Why do you duplicate the same test condition?
@llaske
if(this.endOfGame){ if(app.renderInto(document.getElementById("board"))){ sound.pause(); } }
I use duplicate condition because here we have to stop the sound when the user navigates to the home screen so I inside the if-statment, we have to add only sound.pause();
If is it not a good approach then I try another way. but it works i test in my local device it successfully solved the issue.
another way is to directly use sound.pause()
inside the above statement but I think maybe it is not a good idea initially I think that for control sound I have to make a separate box so that it is more readable and further in future anyone can manipulate this if this is not a good approach then I use directly inside the previous if -statement if it is not appropriate.
Not sure to understand your explanation.
Simpler is better: do not duplicate the if statement and add the pause
call in the existing one.
@llaske kindly review this now i think it looks good now.
@llaske please review this pr.
The defeat music in the Tank Operation activity persists even after returning to a previous screen. This PR resolves the issue by ensuring that the defeat music stops correctly during navigation. here is how I solve this issue: by using the if statement i.e if the game ends && the screen is also changed then the sound will pause Activity name: Tank-operation. Issue: #1553 @llaske please review this PR.