Unable to use if (this.pot1Sprite.isVisible()==true) in update function

Unable to use if (this.pot1Sprite.isVisible()==true) in update function
0.0 0


Hi,if I use if (this.pot1Sprite.isVisible()==false) in update function, then when I run the project it works properly.

But If I just change false to true then it stops working.
means if I use if (this.pot1Sprite.isVisible()==true) my project fails to run.

This is what I want to do in update function -

if (this.pot1Sprite.isVisible() == true && rectIntersectsRect(this.pot1Sprite.getBoundingBox(), this.hammerSprite.getBoundingBox()) && !isCollide)
isCollide = true;

please help me what is wrong with it.



replace rectIntersectsRect with cc.rectIntersectsRect


ok. Thanks problem solved.