Jump to content

Search the Community

Showing results for tags 'signal'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 7 results

  1. Hi everyone, I'm trying to make a sprite moving when the mouse is over it and I'd like it to stop when the mouse is not over it anymore. Here is my code: mySprite.events.onInputOver.add(() => touchMouse = true); mySprite.events.onInputOut.add(() => touchMouse = false); and update() { if (touchMouse) { mySprite.x += 5; } } My sprite is correctly moving but the onInputOut signal is not dispatched if I don't move the pointer out of the initial position of the sprite !! This result in my sprite moving out of my pointer and continuing its journey until I move m
  2. Iorana! I have just a little question about onInputOut behaivour in mobile/touch devices. I have this scenario in Phaser 2.6.2: A small lovely Sprite with inputEnabled activated to handle events, connected with events.onInputOver and events.onInputOut, just for hover actions. No problems there. If I test it in desktop, the signals are dispatched correctly if I move the mouse over the sprite and then move it away from it. But in mobile/touch the behaivour is different. Obviously, you can't "move" a touch Pointer like a mouse, but anyways if you tap the sprite events.onInputOver is di
  3. Hello, I am trying to make a small basketball free-throw game similar to the emoji basketball game on Facebook. I was following along with an example from Phaser (World Bounds Event) to try to respawn the ball when it hit the edge of the screen. I've tried to implement that below (see code) but the respawn function never fires. Does anyone know what I'm doing wrong? Envirolympics.TestGame = function (game) { //Variables this.score = null; this.scoreText = null; this.ball = null; this.net = null; this.leftMarker = null; this.rightMarker = null; this.launched = false; this.
  4. Hi, I'm having a problem (it looks like a bug) with phaser.signal detecting when a video has ended when using changeSource function. I'm using phaser 2.4.8 (but it also happened with 2.4.6). To reproduce the issue, please change both videos and the image button with some media you have. Once you run the demo, check your developer console each time button is pressed. The first time the video is stopped, it says "Played 1 times" The second time it says "Played 2 times" AND "Played 3 times" The third time it says "Played 4 times", "Played 5 times" AND "Played 6 t
  5. I have on an extended Phaser.Game class the following let game = this; game.onGameStart = Phaser.Signal(); function startGame(){ game.onGameStart.dispatch(); } in an extended Phaser.State class I have the following create(){ let game = this.game; game.onGameStart.add(this.start, this); game.message.on('message', function(){ game.startGame(); } // message is a node server web socket remote trigger response game.paused = true; } function start() { this.game.paused = false; } When game.startGame() gets called start its called but the game._paused and game._codePaused is still s
  6. Hey, I'm pretty new to the Phaser scene, and I was having trouble grokking the Phaser's signal system. I noticed there weren't any code examples in the Examples section, so once I got a handle on it, I made this little signals example: http://phaser.io/sandbox/NUpUhphz Hope this might help anyone else getting to know signals better!
  7. Yesterday I used onComplete to call a function after an animation finished playing. Today I ran the game and this error: Error: Phaser.Signal: listener is a required param of add() and should be a Function.The function still gets called and does its thing, but the game just stops because of the error. This didn't happen yesterday. The odd thing is that I do have a listener as parameter, and it is a function. My code: wait_for_animation: function(name,framerate) { playerState = 0; player.body.velocity.x = 0; player.animations.play(name, framerate, false); player.animations.currentA
  • Create New...