Hi I have class that contains CCsprite and Im using that class in the gamelayer to walk around. I wanted to get current position of the Node so I called,
NSLog(@"%d",myClass.sprite.position.x);
NSLog(@"%d",myClass.sprite.position.y);
or
NSLog(@"%d",myClass.position.x);
NSLog(@"%d",myClass.position.y);
But it only returns 0 value in console. Im I dealing with wrong thing here?
The
positionmember variable is of typeCGFloat, so the correct flag for it’s members (xandy, both floats) is%f, not%d.