Ich arbeite an einem Ballspiel und neu zu schnell. Ich versuche den Ball mit SKCropeNode zweifarbig zu machen. Es wirft diesen Fehler auf: "kann addchild nicht mit einer Argumentliste vom Typ (skcropnode) aufrufen"Ich versuche, addChild withSKCropNode - Fehler
Ich habe viele verschiedene Dinge ausprobiert, aber ich bin mir nicht sicher, wie ich das beheben kann. Vielen Dank für Ihre Hilfe
static func make()-> Ball {
var anchorPoint = CGPointMake(0.5, 0.5)
// Half Circle #1
let myCrop1 = SKCropNode()
let myMask1 = SKSpriteNode(color: UIColor.blackColor(), size: CGSizeMake(100, 100))
myMask1.position.y = -50
let ball = SKShapeNode(circleOfRadius: 50)
ball.lineWidth = 0
ball.fillColor = UIColor.blueColor()
myCrop1.addChild(ball)
myCrop1.maskNode = myMask1
addChild(myCrop1) //ERROR HERE
// Half Circle #2
let myCrop2 = SKCropNode()
let myMask2 = SKSpriteNode(color: UIColor.blackColor(), size: CGSizeMake(100, 100))
myMask2.position.y = 50
let circle2 = SKShapeNode(circleOfRadius: 50)
circle2.lineWidth = 0
circle2.fillColor = UIColor.redColor()
myCrop2.addChild(circle2)
myCrop2.maskNode = myMask2
addChild(myCrop2)
return ball
http://stackoverflow.com/questions/35109905/how-to-draw-a-hollow-circle-with-two-different-colors – squarehippo10