Search the Community

Showing results for tags 'pause'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 38 results

  1. When I create a repeating tween that yoyos with : var tween = game.add.tween(sprite).to({y: sprite.y+100}, 1000, Phaser.Easing.Linear.None, true, 0, 9999, true);it restarts beautifully when I leave the browser and return. But when I create a chained tween that loops, like : var tween = game.add.tween(sprite).to({y: sprite.y+100}, 1000, Phaser.Easing.Linear.None, true, 0, 0, false);tween.to({y: sprite.y}, move.time, Phaser.Easing.Linear.None, true, 0, 0, false);tween.loop();then the tween is stopped and doesn't always restart when I return to the browser (but sometimes it does, after a while!). Is there a reason for this, or is this a bug? Any way to make this work? UPDATE It seems the autostart of the second chained tween causes this behaviour. When I only set autostart on the first tween, the tween is being restarted when I return to the browser.
  2. Title Render gets called, but update doesn't.
  3. DrSpock

    Pausing and Resuming Timer

    Quick question about using the timer and loop in Phaser. I'm trying to get a program that runs a timer that checks how long the user has been playing the game, with the time displayed and it needs to be able to pause when a menu is opened. This is what I have currently: function create() { timer = game.add.text(250, 150, '0'); this.currentTimer = new Phaser.Timer(game, false); this.currentTimer.loop(Phaser.Timer.SECOND, this.updateTimer, this); this.currentTimer.start();}function update() { if(pauseButton.isDown){ timer.setText('Pause'); this.currentTimer.pause(); } if(resumeButton.isDown){ this.currentTimer.resume(); timer.setText(counter); test++; }}function updateTimer() { counter++; timer.setText(counter);}Using the console log I can tell that the timer is starting correctly, and can be paused and then resumed. However, the text does not update except to Pause when I press pause. Anyone know a solution to this?
  4. panovsky

    auto - pause

    Has anyone had a problem with the auto pause in the phaser? How to disable it? To disable it using: this.stage.disablePauseScreen = true; and this.stage.disableVisibilityChange = true; when using - auto pause turned off, but if you click on another tab in chrome - again cut one auto pause. this.onPause.add (gamePausedFunc); this.onResume.add (gameResumedFunc); here is the same, even if the write game.paused = false; in functions And the main problem is that when triggered auto pause during playback animation - animation stops and can not be played at all after returning to the game.
  5. Hi *, I am very excited about the new pauseUpdate function, which runs while game.paused = true. However, I am unsure how to use it. While it constantly runs once the game is paused, it does not allow to react to input on priorly defined sprites (i.e., pause menu elements that I defined before pausing the game). For example, checks for menuTextButton.input.isDown stop to work in pauseUpdate once the game is paused. So, how do I use pauseUpdate to react to user input, for example, to resume the game?
  6. I have a listener on the space button the pause the game, like so: this.space = game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR);this.space.onDown.add(function() { game.paused = !game.paused;}, this);I press the spacebar once, it pauses the game. I press it again, it unpauses it. I press it AGAIN and it doesn't pause. Why is this happening? Also; if I replace the game.paused = !game.paused;with just console.log("Here.");I get a log at every press, like desired. So it has something to do with the pause mid-execution of the listener. Not sure what the fix for that is, though.
  7. Introvert Studios

    Pausing physics?

    Using the Phaser states, I would like to be able to pause the game while retaining the ability to click on other buttons in that state. At the moment, when the game is paused it seems the engine takes over and prevents input to other buttons and such. An alternative solution for me, would be to just pause physics updates, but can't find anything that lets me do this (The end result will be a pause screen that I can input to, before un-pausing again). - Thanks'!
  8. Hey guys, I'm trying to code a pause function into my little game. I already read the other treads about this topic. I found no way to disable only particular keys, like the cursors, while game is paused. My code: pauseGame: function() { pauseSound.play(); this.paused = !this.paused; if (this.paused) { level.pause(); player.pause(); } else { level.resume(); player.resume(); } }And inside Player.js: pause: function() { this.game.input.keyboard.removeKey(Phaser.Keyboard.UP); }, resume: function() { this.game.input.keyboard.addKey(Phaser.Keyboard.UP); }Thanks for your help! All the best Andreas
  9. Hey guys, first time posting here. I have a black background sprite that appears when my game is paused to fade out the screen. In the create function I create it, set its alpha to 0.5, and set its visible value to false (I also put the body to null if that makes a difference). When the paused button is pressed, I set its visible property to true and pause the game. In my update function I set its visible to false, so that when the game isn't paused, the background is hidden. For some reason this doesn't work the first time I pause the game, but it works every time after that. It just really bothers me. Is there something I'm missing? Thank you.
  10. JoseDu

    Pause on device lock - iOS

    Hi everyone, is there any way how to detect and pause game when iOS (7) device is locked? When I lock my device during the game, it still runs on background. It also happens when I leave browser (Safari, Chrome) with the home button and then resume. Everything works fine on Android devices or when I switch tabs on iOS. I have "disableVisibilityChange" set to "false" and pausing the game with the "this.game.onPause" event. You can play the game on: http://brainie.strangevillage.com/brainie_test/ Thanks!
  11. Hello, i wonder if this is the right section to ask: i am doing a game with phaser and wrap it up for android with cocoonjs. Now when i close the game with the home-botton, the game doesn´t change in pause mode.. seems the visibitliychange event doesn´t fire here and this cause the game to crash. When you open up the app again the screen is frozen but you can see that the game logic didn´t paused. Any ideas how i can workaround here? Thanks Sven
  12. when I tested on PC and iPad all works fine, but with android galaxy devices have a problem after the losing focus on browser. I added that line in the create function of preloader: game.stage.disableVisibilityChange = true;I've updated also: (src/input/Pointer.js) // Fix to stop rogue browser plugins from blocking the visibility state eventif (this.game.stage.disableVisibilityChange === false && this.game.paused && this.game.stage.scale.incorrectOrientation === false){this.game.paused = false;return this;}also tried to comment out the check below it, don't help probably that already fixed it in the new version, but my project 100% ready in the 1.1.3 version, and need to fix only that one. + Phaser.CANVAS render
  13. I have been playing with Phaser and i have this, I'm new to java script and i don't know if the things I'm doing are the right ways to do them, so any feedback to improve my code would be nice Also When I resume the music using (pause the music pressing P, i will add a button later). music.resume(); the music starts over again, am I doing something wrong ? When I finish I would maybe do a post about my experience starting with Phaser so others could learn from my mistakes.