Diego Mellizo

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. Diego Mellizo

    Spawning enemies at random period

    Thank you for the code. I used it like this to make it work: this.game.time.events.add(time, createNewEnemy, this);
  2. Thanks for your response. I tried putting "game.input.activePointer.dirty = true;" inside the update function, but it's still not working. I also tried scrolling the window using the mouse wheel while holding and wiggling the pointer over the image, same result. Additionally, i did the test putting the pointer over the button and maintaining it static (no wiggling), after the second or third click it works, it's like it has a delay (maybe after it enters the screen) before it gets active.
  3. Context: in my game i got the setup you can see in the image. I got an image larger than the window, so i'm able to displace the image with the window's scroll bar, in the lower part of the image I got a button so it's initially hidden. Problem: When I scroll down to see the button and put the pointer over it, it doesn't work for a few seconds (it doesn't execute input events. No hand cursor), after moving the cursor a little while over the button, it works again. I also checked the variables "visible" and "inputEnabled" in the update() but they are always true, so I suppose Phaser do something else to disable elements which are off-screen, and re-enable them once they are on-screen. Any suggestion would be highly appreciated.