I try to create a path between two planets, I have no compilation error but I do not understand why there is nothing that appears on my simulator
iOS
1
Posts
1
Posters
3
Views
1
Watching
-
I create a mobile shooting video game, I would like to create a line between each planet (8 planets in total) to form a path but I do not understand why my line does not appear. Here is my code: I want to say that I start in Swift and Spritekit.
Here is my code
var line = SKShapeNode()
let path = CGMutablePath()
path.addLines(between: [CGPoint(x: size.width * 0.3 , y: size.height * 0.9), CGPoint(x: self.size.width/2, y: self.size.height/1.22)])
line.path = bezierPath.cgPath
line.strokeColor = SKColor.red
line.lineWidth = 2
addChild(line)