Created
September 25, 2012 23:07
-
-
Save georgejecook/3785001 to your computer and use it in GitHub Desktop.
this blows up at the method invocation [super.position = position is fine]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)setPosition:(CGPoint)position { | |
if (self.isInPlasma){ | |
_CCSpriteSetPositionMethod = class_getInstanceMethod([CCSprite class], @selector(setPosition:)); | |
((void(*)(id, SEL, CGPoint))_CCSpriteSetPositionMethod)(self, @selector(setPosition:), ccp(position.x, position.y- 100)); | |
} else { | |
super.position = position; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment