I have a sprite, for example, a ball.
The ball runs with a scheduler that maps out the ball's route.
-(void)update:(ccTime)dt {
...
...
self.position = ccp(x,y);
yP = self.position.y;
xP = self.position.x;
}
In another file, I need to grab these updated coordinates and use them for other sprite actions.
I have tried to write a method within ball.m that returns yP. But NSLog always returns the value as 0.
Hence, the question is, how do I access these coordinates from another file?
Thanks
Kevin