Is there any way I can set CCPropertyAction for "position.y" for example?
CCPropertyAction for node position, possible?
(4 posts) (2 voices)-
Posted 1 year ago #
-
maybe in your sprite subclass you could write a getter and setter for Y that accessed self.position.y?
-(NSNumber) y { return [NSNumber numberWithFloat:self.position.y]; } -(void) setY:(NSNumber) yIn { self.position.y = [yIn floatValue]; }would that work?
Posted 1 year ago # -
or as a category for CCNode so its available everywhere maybe.
Posted 1 year ago # -
Yes, I did something similar in the meantime, made something like proxy property that CCPropertyAction can access directly, and then changed node's position from there...
Thanks for other suggestions
Posted 1 year ago #
Reply
You must log in to post.