Why it's possible to instantiate a SKShapeNode like this
let circle = SKShapeNode(circleOfRadius: 10)
But when i want to create a class that inherit form SKShapeNode
i cant do something like this:
public class Player:SKShapeNode{
public var playerName : String
private var inventory: [enumObject]
init(nameOfPlayer:String, position:CGPoint, radious: CGFloat) {
super.init(circleOfRadius: radious)
self.position = position
self.fillColor = SKColor.white
playerName = nameOfPlayer
inventory = [enumObject]()
}
}
It says that this init is not the designed init for SKShapeNode
, I searched about it but couldn't find the right way of creating this damn circle.