You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
The text was updated successfully, but these errors were encountered: