Skip to content

Instantly share code, notes, and snippets.

@georgejecook
Created September 25, 2012 23:07
Show Gist options
  • Save georgejecook/3785001 to your computer and use it in GitHub Desktop.
Save georgejecook/3785001 to your computer and use it in GitHub Desktop.
this blows up at the method invocation [super.position = position is fine]
- (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