Skip to content

Instantly share code, notes, and snippets.

@vsergeyev
Created February 21, 2012 09:20
Show Gist options
  • Save vsergeyev/1875375 to your computer and use it in GitHub Desktop.
Save vsergeyev/1875375 to your computer and use it in GitHub Desktop.
Multitouch handler for "Chpok!" iOS game
this.addEventListener('touchstart', function(e) {
for(var i in e.touches) {
var touch = e.touches[i];
var node = touch.target;
if (node.className == 'bubble') {
node.className = 'bubble done';
PhoneGap.exec("SoundPlug.play", "sound.m4a");
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment