When i try to add:
self.physicsWorld.contactDelegate = self;
to the code of my main scene i get the following error:
'Assigning to 'id' from incompatible type 'MGLCreateMainGameScene *const_strong'
How can i fix this? This is what i have:
-(void)createMainGameScene
{
self.currentBackground = [MGLBackground generateNewBackground];
self.scaleMode = SKSceneScaleModeAspectFit;
self.physicsBody = [SKPhysicsBody bodyWithEdgeLoopFromRect:self.frame];
self.physicsWorld.gravity = CGVectorMake(0.0, -3.0);
self.physicsWorld.contactDelegate = self;
[self addChild:self.currentBackground];
}