You get a +1 node to add a fill to the circle
So,
- (void) makeACircle { SKShapeNode *ball; ball = [[SKShapeNode alloc] init]; // stroke only = 1 node // CGMutablePathRef myPath = CGPathCreateMutable(); // CGPathAddArc(myPath, NULL, 0,0, 60, 0, M_PI*2, YES); // ball.path = myPath; // ball.position = CGPointMake(200, 200); // [self addChild:ball]; // stroke and fill = 2 nodes CGMutablePathRef myPath = CGPathCreateMutable(); CGPathAddArc(myPath, NULL, 0,0, 60, 0, M_PI*2, YES); ball.path = myPath; ball.fillColor = [SKColor blueColor]; ball.position = CGPointMake(200, 200); [self addChild:ball]; }
Dogcoffee
source share