javascript - A collision function is not allowing my missile to move -


http://pastebin.com/29ctcnee

inside drawmissile() function make moves missile's y position 5 pixels each frame! there function being called: missilecollision()

inside missilecollision() function checks if touching bowl, if is, give point , reset position! if missile misses bowl , goes bottom of screen, lose life!

here problem, when calls "missilecollision()" function, won't move down 5 pixels! tried taking out "missilecollision()" function, worked should! why calling "missilecollision()" function stops missile moving?

i had tried removing "missilecollision()" function entirely , cut , pasted code "drawmissile" function didn't work :(

-thanks in advance!

i haven't check code line (86) looks bad:

if (missiley = playery-missileythick .. 

you're doing assignment here. use === (instead of =) compare 2 variables of same type.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -