tux4kids / Tux4ME

A mind exercise game by Tux4Kids organization developed under Google summer of Code - 2015
GNU General Public License v3.0
19 stars 28 forks source link

Game paused #1

Open Vigneshsekar opened 9 years ago

Vigneshsekar commented 9 years ago

To Pause the game using game.paused inbuilt function in Phaser. Currently it has been done manually, as when the pause button is clicked everything else freezes.

Vigneshsekar commented 9 years ago

updateScore, updateTimer and other consecutive functions in all the four initial games are executed only if gamePaused is == 0. when the pause button is clicked gamePaused becomes 1 and it stops all functions from executing.

AkshayAgarwal007 commented 8 years ago

A documentation of your code would be useful to implement this. I'm half done but variables like gamephase and for what other conditional branches you are using the pauseState variable(and why?),if you can tell me that in brief, it would be very easy to fix this.

AkshayAgarwal007 commented 8 years ago

This is the patch file . You can apply and check this. This implements the pause functionality using game.paused and separates pause and replay logic and has a better UI implementation of the same. But still the pauseState variable is there as I couldn't understand its use in other parts of the code well because of lack of documentation and use of too many global variables. Hope you can fix that further based on this patch or give me a briefing of its usage, it will take me 10-15 minutes to fix it then.

pause1 pause2

Vigneshsekar commented 8 years ago

Hi @AkshayAgarwal007 . @Deepaksharm have already worked on this issue earlier (Check for the closed pull requests) and did a good job. We didn't find any significance in using game.paused state of phaser. So we decided to go with the variable and used the same to achieve many other functionalities. PauseState variable is used to check whether the game is in Pause state or Active state. If PauseState == 1, user answers will not be evaluated.

deepakagg commented 8 years ago

This issue was moved to tux4kids/Tux4ME#1

Vigneshsekar commented 8 years ago

@deepakagg May i know what is happening here ? Can't we transfer the ownership of this repo to Tux4Kids Org. account ? I think that will be a better idea to do so.