• Content Count

  • Joined

  • Last visited

  1. I can post some code if needed but, when testing my game on a Nexus 7 tablet whenever I press a button it stays in the down state, never returning to the out state. This situation doesn't occur on my Xperia V phone or on Google Chrome.
  2. Well, I figured out all my problems, at least for me anyway. In the contacts example they use the render function and debug.text, which caused a whole bunch of errors. To fix this I just used a simple text object and setText to change it when blockHit was called. As far as colliding with the plane goes I'm fairly certain that's something to do with colliding with the edges of the world. Gonna try figure out how to stop it checking for the sprite if it collides with the world edge.
  3. Hi, I'm having some trouble trying to get contact events implemented into my game. All I'm doing right now is creating two sprites (redBlock and greenBlock), enabling p2 physics on each then add the onBeginContact callback which should call the 'blockHit' function when something comes in contact with it. When this function gets called however (which is instantly), the game breaks and the error "Uncaught TypeError: Cannot read property 'sprite' of null." appears. I'm not sure if I've just missed a 'this' or something but any advice would be helpful. EDIT: After some debugging I've found that the body being passed in is null and that ShapeB is a Plane. As far as I know I'm not adding Plane to any object though.
  4. Thanks Lewster, I was thinking of something like that but had no idea how to implement it in phaser. Unfortunately I've moved from arcade physics to p2 so I'm not sure how much it will apply as there isn't an explicit collide function that I can get the callback from.
  5. I've just started using Phaser and JavaScript and I'm curious if there's a way to convert a finished project into an app an submittable to the app/windows/play store and what restrictions that causes.
  6. I have a group of 'GreenSquares' and I'm wondering how I can check whether any GreenSquare within the group is touching another GreenSquare. I'm also wondering if there's a way I could check if a single GreenSquare is touching not just one, but two other GreenSquares. Any advice at all would be appreciated.