On cocos2d-iphone, I can use ccDrawCircle to draw circles. What I don’t know how to do is to fill between 2 ccDrawCircles that have the same ccp centre (sort of like a bicycle tire). I tried just using drawing a whole lot of ccdrawcircles in an attempt to get the effect i want but I’m hoping there is another way.
I’m also a little confused on what does the ‘segments’ parameter do for ccDrawCircle.
For anyone else who needs the answer to my questions, it is possible to write a while loop within an overridden draw method that is inherited within CCLayer. You just have to make sure you have the variables updated at your controller’s update method.
The segments parameter seems to be the number of triangle/vertices/segments you want to use to draw the circle. The higher the number, the ‘smoother’ your circle will be. Hopefully this helps someone else.
Cheers!