Skip to content

Commit

Permalink
Merge pull request #5 from nacrossweb/master
Browse files Browse the repository at this point in the history
didBeginContact was called from didEndContact
  • Loading branch information
buddingmonkey committed Feb 10, 2014
2 parents a564b88 + bd93d4d commit 0b87584
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SpriteKit-Components/SKComponentScene.m
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ - (void)didBeginContact:(SKPhysicsContact *)contact {
- (void)didEndContact:(SKPhysicsContact *)contact {
if ([contact.bodyA.node isKindOfClass:[SKComponentNode class]]) {
for (id<SKComponent> component in ((SKComponentNode*)contact.bodyA.node).components) {
SKComponentPerformSelectorWithObject(component, didBeginContact, contact);
SKComponentPerformSelectorWithObject(component, didEndContact, contact);
}
}
if ([contact.bodyB.node isKindOfClass:[SKComponentNode class]]) {
for (id<SKComponent> component in ((SKComponentNode*)contact.bodyB.node).components) {
SKComponentPerformSelectorWithObject(component, didBeginContact, contact);
SKComponentPerformSelectorWithObject(component, didEndContact, contact);
}
}
}
Expand Down

0 comments on commit 0b87584

Please sign in to comment.