Jump to content

Consty

Members
  • Posts

    5
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Consty

  1. Yes that is a way to do it. If it is the correct way is always debatable depending on your project etc.. But this should definitely work. In my first response I did not include the collided objects, because you did not specify that you wanted them in your initial question Hope that this has helped you
  2. Assuming the killEnemy is a function, you can wrap the callback for the collision inside a function like the following example. this.game.physics.arcade.collide(player.sprite, this.enemies, function(){ player.killEnemy(score);}, null, player);Where you get the score variable from is up to you . However, this creates a new function every time this code gets executed, which can be optimized by declaring the function elsewhere and then pass the reference to the collide function. But, if you just want to see how you can do it, this should suffice
  3. Tested it on an iPhone 5 with iOS 6, runs smoothly with all three difficulty levels. One minor thing though, I accidentally pressed the url address bar above the back button (sigh) and the address bar didn't hide anymore after that. Because of that it was difficult to move the clown because it was partially behind the Safari navigation menu at the bottom. I just thought I'd mention it. All in all, nice game !
  4. If your question is how to save unlocked levels locally, I suggest looking into the localStorage API. http://slides.html5rocks.com/#web-storage You can easily save data (like unlocked level id's etc...) and retrieve it at the start of your game to unlock the required levels.
  5. The game works great on an iphone 5c. The bug pspmiracle mentioned doesn't happen anymore, probably fixed it. One weird thing though is that if you try to fast swap gems that don't make a match in different locations, the match doesn't swap back correctly. (See screenshot)
×
×
  • Create New...