Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate Pause logic from Replay logic and make the code more modular. #37

Open
AkshayAgarwal007 opened this issue Mar 24, 2016 · 1 comment

Comments

@AkshayAgarwal007
Copy link

We should separate the pause logic from the replay logic and make the code more modular so that it would be easy for a new developer to pick up parts of code and develop a new level. The replay logic shouldn't have any relation with the pause logic.

This is different from the issue #1. This is not concerned with replacing the use of pauseState with game.paused but with separating the pause logic from replay logic and using better graphics to represent the same. function replayGame() { pause.destroy(); pause = game.add.sprite(575,455,'pause'); pause.inputEnabled = true; tempText = game.add.text(470, 470 , ' ' , {font : "15px Arial" , fill : "#eceff1"}); pauseState = 1; pauseAndPlay(); // The replay function shouldn't make use of this. score = 0; displayScore = 0; myscore.setText('000'); timer.setText('00:00:00')

pauseAndPlay(); // This replay function shouldn't make use of this.

@AkshayAgarwal007 AkshayAgarwal007 changed the title Separate Pause logic from Replay logic and implement a better UI/representation for the pause state. Separate Pause logic from Replay logic and make the code more modular. Mar 24, 2016
AkshayAgarwal007 pushed a commit to AkshayAgarwal007/Tux4ME that referenced this issue Mar 25, 2016
@AkshayAgarwal007
Copy link
Author

#38. I have fixed this for mindmath.js. This would require a similar implementation for other games as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant