Use the following steps to add the intro scene:
Logicand add a class inside this group called
Collisionwhich is a subclass of
Collisionclass, as shown in the following code:
+(void) checkShipCollision: (Ship *) ship1 againstShip: (Ship *) ship2 withReferenceToSprite: (SPSprite *) sprite;
Collision.m, implement the
checkShipCollisionmethod with the following lines of code:
SPRectangle *enemyShipBounds = [ship1 boundsInSpace:sprite]; SPRectangle *ball1 = [ship2.cannonBallLeft boundsInSpace:sprite]; SPRectangle *ball2 = [ship2.cannonBallRight ...