Tácio Sousa Posted May 15, 2013 Share Posted May 15, 2013 I'm here again with a little bit more questions. I want to know how i do to : - Pause the game. (I've tried game.pause, game.paused, game._paused and more other pause methods and all results in error)- Stop the game controls. (Things inside update, input checks, player moves, ...)- Play sounds/musics. I'm making a "Aero Fighters" clone, and i'll need this for the ending of every stage, something like "final stage animation". Thanks for anyone who help me. Link to comment Share on other sites More sharing options...
rich Posted May 15, 2013 Share Posted May 15, 2013 If you set Game.paused = true then it will enter a pause loop mode, which only calls updates on the tweens, input and stage and, if you've specified one, your own onPausedCallback. If you want to turn off the built-in pause screen then set Stage.disablePauseScreen to true. Input has changed totally now and you can disable input checks easily (Input.disabled = true). Sound and Music only works using Web Audio at the moment. It's being totally rewritten at the moment, but you can still use it for now if you need. Just use the Loader to load a sound, and then do Game.sound.play() and give it the key to play. Link to comment Share on other sites More sharing options...
Tácio Sousa Posted May 16, 2013 Author Share Posted May 16, 2013 I've tried many ways, and nothing happened. I put : Phaser.Stage.disablePauseScreen = true;Phaser.Input.disabled = true;this.game.input.keyboard.disabled = true;this.game.inputEnabled = false;this.game.input.disabled = true;this.game.stage.disablePauseScreen = true; And the game continues running normally together with all inputs. Link to comment Share on other sites More sharing options...
rich Posted May 16, 2013 Share Posted May 16, 2013 Sorry I should have made it more clear - all of the "input.disabled" features are in the 096 branch. Link to comment Share on other sites More sharing options...
Tácio Sousa Posted May 16, 2013 Author Share Posted May 16, 2013 So...0.95 don't have any form to cancel the inputs? Or i've to "learn to use" this methods above? Link to comment Share on other sites More sharing options...
rich Posted May 16, 2013 Share Posted May 16, 2013 Nope, I only added it 2 days ago! Input has changed totally in 096, lots and lots of new features. Link to comment Share on other sites More sharing options...
Tácio Sousa Posted May 16, 2013 Author Share Posted May 16, 2013 Hummm ok ok, so i'll waiting the 0.96 version to continues my things, thanks one more time Rich. Link to comment Share on other sites More sharing options...
Recommended Posts