1
votes

I have a CCNode subclass and I have draw several lines on it. And I want to add this CCNode subclass to other Layers. However I don't how big this CCNode is. And the center of coordinate is the lower left corner of screen.

So my question is how can I change the CCNode size? And how can I change the center of coordinate when I am using my custom CCNode?

Now I am using Cocos2d-x-2.1.5

1

1 Answers

1
votes
  • CCNode Size means I think it is setContentSize.
  • You can user setPosition method of CCNode to change position.(to change the center of coordinate) It depends on AnchorPoint also.
  • Just refer CCNode.h. You will get to know what you have to do.