GameQuery Collision Detection

Posted by Pez Cuckow on Stack Overflow See other posts from Stack Overflow or by Pez Cuckow
Published on 2010-06-05T16:25:21Z Indexed on 2010/06/05 16:32 UTC
Read the original article Hit count: 442

I am having a problem with GameQuery (jQuery) collision detection

Tthey just never seem to fire?!? I have checked all the .arrow's exist and the same for the .bot's but it just never seems to call the function

I have the below code in my main callback:

$(".bot").each(function(){
 $(this).collision(".arrow").each(function(){
  alert("Test");
 });
});

Do you have any idea why this would just simply be doing nothing? The bot walks (has it's x value) moved right over the arrow.

Current revision online at http://labs.pezcuckow.com/solveit/game.html (no where near finished) if anyone doesn't mine having a look!

Many thanks,

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery