Im trying to add a straight line in sprite kit, so far I haven't find any problem in my code but when I run the app the node count stays at 0 and it doesn't displays any errors. I been stuck for hours... any clues? do I have to create a separate array of coordinates for the points to work? thanks in advance.
import SpriteKit
class GameScene: SKScene {
override func didMoveToView(view: SKView) {
var path = CGPathCreateMutable()
var line = SKShapeNode()
line.zPosition = 1
line.position = CGPointMake(100, 100)
CGPathMoveToPoint(path, nil, 0, 0)
CGPathAddLineToPoint(path, nil, 15, 15)
line.path = path
line.lineWidth = 15
line.fillColor = UIColor.blackColor()
line.strokeColor = UIColor.blackColor()
self.addChild(line)
}