The collidesWith() method is a method of the Sprite class. It is used to check the collision of this Sprite with a specified Sprite. The general syntax of this method is as follows:
Here, sprite is the instance of the Sprite class to test the collision with another Sprite.
The pixellevel parameter takes either true or false value. It takes true to test for collision on a pixel-by-pixel basis, and false to test using simple bounds checking.
This method returns true if two Sprites have collided, else it returns false.
Click here to get free scmad SCMAD exam practice questions. Download free practice test for CX310-110 SCMAD Mobile Application Developer exam.If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.